diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php index ea4d5f35cb..98b0e4dc56 100644 --- a/phpBB/includes/acp/acp_groups.php +++ b/phpBB/includes/acp/acp_groups.php @@ -371,7 +371,7 @@ class acp_groups { if ($data['width'] > $config['avatar_max_width'] || $data['height'] > $config['avatar_max_height']) { - $error[] = avatar_error_wrong_size($data['width'], $data['height']); + $error[] = phpbb_avatar_error_wrong_size($data['width'], $data['height']); } } @@ -381,7 +381,7 @@ class acp_groups { if ($data['width'] < $config['avatar_min_width'] || $data['height'] < $config['avatar_min_height']) { - $error[] = avatar_error_wrong_size($data['width'], $data['height']); + $error[] = phpbb_avatar_error_wrong_size($data['width'], $data['height']); } } } @@ -627,7 +627,7 @@ class acp_groups 'U_BACK' => $u_back, 'U_SWATCH' => append_sid("{$phpbb_admin_path}swatch.$phpEx", 'form=settings&name=group_colour'), 'U_ACTION' => "{$this->u_action}&action=$action&g=$group_id", - 'L_AVATAR_EXPLAIN' => avatar_explanation_string(), + 'L_AVATAR_EXPLAIN' => phpbb_avatar_explanation_string(), )); return; diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index a41fd3d17a..c1ad28ca14 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -1748,7 +1748,7 @@ class acp_users 'USER_AVATAR_WIDTH' => $user_row['user_avatar_width'], 'USER_AVATAR_HEIGHT' => $user_row['user_avatar_height'], - 'L_AVATAR_EXPLAIN' => avatar_explanation_string() + 'L_AVATAR_EXPLAIN' => phpbb_avatar_explanation_string(), )); break; diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index e3537fe328..5631928f96 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -2039,7 +2039,7 @@ function avatar_remote($data, &$error) { if ($width > $config['avatar_max_width'] || $height > $config['avatar_max_height']) { - $error[] = avatar_error_wrong_size($width, $height); + $error[] = phpbb_avatar_error_wrong_size($width, $height); return false; } } @@ -2048,7 +2048,7 @@ function avatar_remote($data, &$error) { if ($width < $config['avatar_min_width'] || $height < $config['avatar_min_height']) { - $error[] = avatar_error_wrong_size($width, $height); + $error[] = phpbb_avatar_error_wrong_size($width, $height); return false; } } @@ -2388,7 +2388,7 @@ function avatar_process_user(&$error, $custom_userdata = false, $can_upload = nu { if ($data['width'] > $config['avatar_max_width'] || $data['height'] > $config['avatar_max_height']) { - $error[] = avatar_error_wrong_size($data['width'], $data['height']); + $error[] = phpbb_avatar_error_wrong_size($data['width'], $data['height']); } } @@ -2398,7 +2398,7 @@ function avatar_process_user(&$error, $custom_userdata = false, $can_upload = nu { if ($data['width'] < $config['avatar_min_width'] || $data['height'] < $config['avatar_min_height']) { - $error[] = avatar_error_wrong_size($data['width'], $data['height']); + $error[] = phpbb_avatar_error_wrong_size($data['width'], $data['height']); } } } @@ -2444,7 +2444,14 @@ function avatar_process_user(&$error, $custom_userdata = false, $can_upload = nu return (sizeof($error)) ? false : true; } -function avatar_error_wrong_size($width, $height) +/** +* Returns a language string with the avatar size of the new avatar and the allowed maximum and minimum +* +* @param $width int The width of the new uploaded/selected avatar +* @param $height int The height of the new uploaded/selected avatar +* @return string +*/ +function phpbb_avatar_error_wrong_size($width, $height) { global $config, $user; @@ -2457,7 +2464,12 @@ function avatar_error_wrong_size($width, $height) $user->lang('PIXELS', (int) $height)); } -function avatar_explanation_string() +/** +* Returns an explanation string with maximum avatar settings +* +* @return string +*/ +function phpbb_avatar_explanation_string() { global $config, $user; diff --git a/phpBB/includes/ucp/ucp_groups.php b/phpBB/includes/ucp/ucp_groups.php index e3e4e8ce22..f2e2e616b7 100644 --- a/phpBB/includes/ucp/ucp_groups.php +++ b/phpBB/includes/ucp/ucp_groups.php @@ -561,7 +561,7 @@ class ucp_groups { if ($data['width'] > $config['avatar_max_width'] || $data['height'] > $config['avatar_max_height']) { - $error[] = avatar_error_wrong_size($data['width'], $data['height']); + $error[] = phpbb_avatar_error_wrong_size($data['width'], $data['height']); } } @@ -571,7 +571,7 @@ class ucp_groups { if ($data['width'] < $config['avatar_min_width'] || $data['height'] < $config['avatar_min_height']) { - $error[] = avatar_error_wrong_size($data['width'], $data['height']); + $error[] = phpbb_avatar_error_wrong_size($data['width'], $data['height']); } } } @@ -732,7 +732,7 @@ class ucp_groups 'U_SWATCH' => append_sid("{$phpbb_root_path}adm/swatch.$phpEx", 'form=ucp&name=group_colour'), 'S_UCP_ACTION' => $this->u_action . "&action=$action&g=$group_id", - 'L_AVATAR_EXPLAIN' => avatar_explanation_string(), + 'L_AVATAR_EXPLAIN' => phpbb_avatar_explanation_string(), )); break; diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index c2082c99f6..6eb11e6e59 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -602,7 +602,7 @@ class ucp_profile 'S_FORM_ENCTYPE' => ($can_upload && ($config['allow_avatar_upload'] || $config['allow_avatar_remote_upload'])) ? ' enctype="multipart/form-data"' : '', - 'L_AVATAR_EXPLAIN' => avatar_explanation_string(), + 'L_AVATAR_EXPLAIN' => phpbb_avatar_explanation_string(), )); if ($config['allow_avatar'] && $display_gallery && $auth->acl_get('u_chgavatar') && $config['allow_avatar_local'])