diff options
author | Jakub Senko <jakubsenko@gmail.com> | 2016-11-13 15:47:54 +0100 |
---|---|---|
committer | Jakub Senko <jakubsenko@gmail.com> | 2016-11-15 14:22:42 +0100 |
commit | ba5243ba7652049aa2c311a96bfdc94994ddaf4b (patch) | |
tree | b55d4336750e54dee61af63ed1e46090b1bdc3e2 | |
parent | 85898d3d2c7b5ce61a0f92299e06ceade000c4a8 (diff) | |
download | forums-ba5243ba7652049aa2c311a96bfdc94994ddaf4b.tar forums-ba5243ba7652049aa2c311a96bfdc94994ddaf4b.tar.gz forums-ba5243ba7652049aa2c311a96bfdc94994ddaf4b.tar.bz2 forums-ba5243ba7652049aa2c311a96bfdc94994ddaf4b.tar.xz forums-ba5243ba7652049aa2c311a96bfdc94994ddaf4b.zip |
[ticket/14842] Don't display filesize limit if there is none
PHPBB3-14842
-rw-r--r-- | phpBB/includes/acp/acp_users.php | 2 | ||||
-rw-r--r-- | phpBB/includes/functions_user.php | 2 | ||||
-rw-r--r-- | phpBB/language/en/ucp.php | 1 |
3 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 1e453e88ad..9457ad18b8 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -1924,7 +1924,7 @@ class acp_users 'S_FORM_ENCTYPE' => ' enctype="multipart/form-data"', - 'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], $config['avatar_filesize'] / 1024), + 'L_AVATAR_EXPLAIN' => $user->lang(($config['avatar_filesize'] == 0) ? 'AVATAR_EXPLAIN_NO_FILESIZE' : 'AVATAR_EXPLAIN', $config['avatar_max_width'], $config['avatar_max_height'], $config['avatar_filesize'] / 1024), 'S_AVATARS_ENABLED' => ($config['allow_avatar'] && $avatars_enabled), )); diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index b82abe0c5e..0b39339c7f 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -2279,7 +2279,7 @@ function phpbb_avatar_explanation_string() { global $config, $user; - return $user->lang('AVATAR_EXPLAIN', + return $user->lang(($config['avatar_filesize'] == 0) ? 'AVATAR_EXPLAIN_NO_FILESIZE' : 'AVATAR_EXPLAIN', $user->lang('PIXELS', (int) $config['avatar_max_width']), $user->lang('PIXELS', (int) $config['avatar_max_height']), round($config['avatar_filesize'] / 1024)); diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index 59525c6b16..93ee07b1cf 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -100,6 +100,7 @@ $lang = array_merge($lang, array( 'AVATAR_DRIVER_UPLOAD_TITLE' => 'Upload avatar', 'AVATAR_DRIVER_UPLOAD_EXPLAIN' => 'Upload your own custom avatar.', 'AVATAR_EXPLAIN' => 'Maximum dimensions; width: %1$s, height: %2$s, file size: %3$.2f KiB.', + 'AVATAR_EXPLAIN_NO_FILESIZE' => 'Maximum dimensions; width: %1$s, height: %2$s.', 'AVATAR_FEATURES_DISABLED' => 'The avatar functionality is currently disabled.', 'AVATAR_GALLERY' => 'Local gallery', 'AVATAR_GENERAL_UPLOAD_ERROR' => 'Could not upload avatar to %s.', |