mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
Merge pull request #4021 from marc1706/ticket/14272
[ticket/14272] Use html5 valid input elements * marc1706/ticket/14272: [ticket/14272] Allow input of floats for filesize [ticket/14272] Use input type number instead of text in avatars [ticket/14272] Assign min and max values for avatar driver settings [ticket/14272] Define min and max values for avatar width and height [ticket/14272] Disable not toggled form elements [ticket/14272] Make sure phpbb_avatar_manager was defined [ticket/14272] Remove useless check [ticket/14272] Fix invalid or missing min/max settings [ticket/14272] Assign min/max for all allowed types [ticket/14272] Only use maxlength and size for allowed input elements
This commit is contained in:
@@ -1809,10 +1809,11 @@ class acp_users
|
||||
case 'avatar':
|
||||
|
||||
$avatars_enabled = false;
|
||||
/** @var \phpbb\avatar\manager $phpbb_avatar_manager */
|
||||
$phpbb_avatar_manager = $phpbb_container->get('avatar.manager');
|
||||
|
||||
if ($config['allow_avatar'])
|
||||
{
|
||||
$phpbb_avatar_manager = $phpbb_container->get('avatar.manager');
|
||||
$avatar_drivers = $phpbb_avatar_manager->get_enabled_drivers();
|
||||
|
||||
// This is normalised data, without the user_ prefix
|
||||
@@ -1873,6 +1874,14 @@ class acp_users
|
||||
|
||||
$selected_driver = $phpbb_avatar_manager->clean_driver_name($request->variable('avatar_driver', $user_row['user_avatar_type']));
|
||||
|
||||
// Assign min and max values before generating avatar driver html
|
||||
$template->assign_vars(array(
|
||||
'AVATAR_MIN_WIDTH' => $config['avatar_min_width'],
|
||||
'AVATAR_MAX_WIDTH' => $config['avatar_max_width'],
|
||||
'AVATAR_MIN_HEIGHT' => $config['avatar_min_height'],
|
||||
'AVATAR_MAX_HEIGHT' => $config['avatar_max_height'],
|
||||
));
|
||||
|
||||
foreach ($avatar_drivers as $current_driver)
|
||||
{
|
||||
$driver = $phpbb_avatar_manager->get_driver($current_driver);
|
||||
|
Reference in New Issue
Block a user