diff options
| author | Marc Alexander <admin@m-a-styles.de> | 2016-03-27 09:59:25 +0200 |
|---|---|---|
| committer | Marc Alexander <admin@m-a-styles.de> | 2016-03-27 09:59:25 +0200 |
| commit | 1600d82b772f419aca8b35d9d404440fecc7a483 (patch) | |
| tree | 7c17ce1fc66bafec9b82d788f2d81b2a654248ce /phpBB/includes/acp | |
| parent | 4db229ff6c6c260e4fdb26449b391f3858c9479a (diff) | |
| parent | b39b3da5af89d9687ff5e985244695131d36c753 (diff) | |
| download | forums-1600d82b772f419aca8b35d9d404440fecc7a483.tar forums-1600d82b772f419aca8b35d9d404440fecc7a483.tar.gz forums-1600d82b772f419aca8b35d9d404440fecc7a483.tar.bz2 forums-1600d82b772f419aca8b35d9d404440fecc7a483.tar.xz forums-1600d82b772f419aca8b35d9d404440fecc7a483.zip | |
Merge remote-tracking branch 'origin/ticket/14272' into ticket/14272-3.2.x
Conflicts:
phpBB/adm/style/acp_icons.html
phpBB/includes/acp/acp_groups.php
phpBB/includes/acp/acp_users.php
phpBB/includes/functions_acp.php
phpBB/includes/ucp/ucp_groups.php
phpBB/styles/prosilver/template/ucp_avatar_options_gravatar.html
phpBB/styles/prosilver/template/ucp_avatar_options_remote.html
phpBB/styles/subsilver2/template/mcp_topic.html
phpBB/styles/subsilver2/template/posting_attach_body.html
phpBB/styles/subsilver2/template/posting_body.html
phpBB/styles/subsilver2/template/posting_poll_body.html
phpBB/styles/subsilver2/template/ucp_avatar_options_gravatar.html
phpBB/styles/subsilver2/template/ucp_avatar_options_remote.html
Diffstat (limited to 'phpBB/includes/acp')
| -rw-r--r-- | phpBB/includes/acp/acp_attachments.php | 4 | ||||
| -rw-r--r-- | phpBB/includes/acp/acp_board.php | 4 | ||||
| -rw-r--r-- | phpBB/includes/acp/acp_groups.php | 13 | ||||
| -rw-r--r-- | phpBB/includes/acp/acp_users.php | 12 |
4 files changed, 25 insertions, 8 deletions
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php index 6e9360f599..ab413bf1d7 100644 --- a/phpBB/includes/acp/acp_attachments.php +++ b/phpBB/includes/acp/acp_attachments.php @@ -1744,8 +1744,8 @@ class acp_attachments $size_var = $filesize['si_identifier']; $value = $filesize['value']; - // size="8" and maxlength="15" attributes as a fallback for browsers that do not support type="number" yet. - return '<input type="number" id="' . $key . '" size="8" maxlength="15" min="0" name="config[' . $key . ']" value="' . $value . '" /> <select name="' . $key . '">' . size_select_options($size_var) . '</select>'; + // size and maxlength must not be specified for input of type number + return '<input type="number" id="' . $key . '" min="0" max="999999999999999" step="any" name="config[' . $key . ']" value="' . $value . '" /> <select name="' . $key . '">' . size_select_options($size_var) . '</select>'; } /** diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index 9d65c48bed..f08f5356c8 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -868,7 +868,7 @@ class acp_board { global $user; - return '<input id="' . $key . '" type="number" size="3" maxlength="3" min="1" max="999" name="config[min_name_chars]" value="' . $value . '" /> ' . $user->lang['MIN_CHARS'] . ' <input type="number" size="3" maxlength="3" min="8" max="180" name="config[max_name_chars]" value="' . $this->new_config['max_name_chars'] . '" /> ' . $user->lang['MAX_CHARS']; + return '<input id="' . $key . '" type="number" min="1" max="999" name="config[min_name_chars]" value="' . $value . '" /> ' . $user->lang['MIN_CHARS'] . ' <input type="number" min="8" max="180" name="config[max_name_chars]" value="' . $this->new_config['max_name_chars'] . '" /> ' . $user->lang['MAX_CHARS']; } /** @@ -896,7 +896,7 @@ class acp_board { global $user; - return '<input id="' . $key . '" type="number" size="3" maxlength="3" min="1" max="999" name="config[min_pass_chars]" value="' . $value . '" /> ' . $user->lang['MIN_CHARS'] . ' <input type="number" size="3" maxlength="3" min="8" max="255" name="config[max_pass_chars]" value="' . $this->new_config['max_pass_chars'] . '" /> ' . $user->lang['MAX_CHARS']; + return '<input id="' . $key . '" type="number" min="1" max="999" name="config[min_pass_chars]" value="' . $value . '" /> ' . $user->lang['MIN_CHARS'] . ' <input type="number" min="8" max="255" name="config[max_pass_chars]" value="' . $this->new_config['max_pass_chars'] . '" /> ' . $user->lang['MAX_CHARS']; } /** diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php index ba39a1a60c..6bd3e71c2e 100644 --- a/phpBB/includes/acp/acp_groups.php +++ b/phpBB/includes/acp/acp_groups.php @@ -325,10 +325,11 @@ class acp_groups $avatar_data = null; $avatar_error = array(); + /** @var \phpbb\avatar\manager $phpbb_avatar_manager */ + $phpbb_avatar_manager = $phpbb_container->get('avatar.manager'); + if ($config['allow_avatar']) { - /* @var $phpbb_avatar_manager \phpbb\avatar\manager */ - $phpbb_avatar_manager = $phpbb_container->get('avatar.manager'); $avatar_drivers = $phpbb_avatar_manager->get_enabled_drivers(); // This is normalised data, without the group_ prefix @@ -669,6 +670,14 @@ class acp_groups $avatars_enabled = false; $selected_driver = $phpbb_avatar_manager->clean_driver_name($request->variable('avatar_driver', $avatar_data['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); diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 76b6275954..5091fcae7e 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -1838,11 +1838,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']) { - /* @var $phpbb_avatar_manager \phpbb\avatar\manager */ - $phpbb_avatar_manager = $phpbb_container->get('avatar.manager'); $avatar_drivers = $phpbb_avatar_manager->get_enabled_drivers(); // This is normalised data, without the user_ prefix @@ -1903,6 +1903,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); |
