From 4f23bb711ca457efba370d7ac67394e0db59b578 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 7 Aug 2014 12:21:46 +0200 Subject: [ticket/12822] Remove "None" option from avatar select boxes This option is just used for deleting avatars for which we already have a checkbox. PHPBB3-12822 --- phpBB/adm/style/acp_groups.html | 1 - phpBB/adm/style/acp_users_avatar.html | 1 - phpBB/language/en/common.php | 1 - phpBB/phpbb/avatar/driver/gravatar.php | 5 +++++ phpBB/phpbb/avatar/driver/local.php | 1 - phpBB/phpbb/avatar/driver/upload.php | 1 - phpBB/styles/prosilver/template/ucp_avatar_options.html | 1 - phpBB/styles/subsilver2/template/ucp_groups_manage.html | 1 - phpBB/styles/subsilver2/template/ucp_profile_avatar.html | 1 - tests/functional/avatar_ucp_users_test.php | 10 ---------- 10 files changed, 5 insertions(+), 18 deletions(-) diff --git a/phpBB/adm/style/acp_groups.html b/phpBB/adm/style/acp_groups.html index 6049673e0a..d24d62497d 100644 --- a/phpBB/adm/style/acp_groups.html +++ b/phpBB/adm/style/acp_groups.html @@ -117,7 +117,6 @@
- diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index a58aec43cd..13fc56e0a1 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -483,7 +483,6 @@ $lang = array_merge($lang, array( 'NO_AUTH_ADMIN_USER_DIFFER' => 'You are not able to re-authenticate as a different user.', 'NO_AUTH_OPERATION' => 'You do not have the necessary permissions to complete this operation.', 'NO_AVATARS' => 'No avatars currently available', - 'NO_AVATAR_SELECTED' => 'You have not selected any avatar.', 'NO_CONNECT_TO_SMTP_HOST' => 'Could not connect to smtp host : %1$s : %2$s', 'NO_BIRTHDAYS' => 'No birthdays today', 'NO_EMAIL_MESSAGE' => 'Email message was blank.', diff --git a/phpBB/phpbb/avatar/driver/gravatar.php b/phpBB/phpbb/avatar/driver/gravatar.php index 4aa7445d20..2082e0fd02 100644 --- a/phpBB/phpbb/avatar/driver/gravatar.php +++ b/phpBB/phpbb/avatar/driver/gravatar.php @@ -69,6 +69,11 @@ class gravatar extends \phpbb\avatar\driver\driver $row['avatar_width'] = $request->variable('avatar_gravatar_width', 0); $row['avatar_height'] = $request->variable('avatar_gravatar_height', 0); + if (empty($row['avatar'])) + { + return false; + } + if (!function_exists('validate_data')) { require($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext); diff --git a/phpBB/phpbb/avatar/driver/local.php b/phpBB/phpbb/avatar/driver/local.php index ff1996854b..07b3ed59de 100644 --- a/phpBB/phpbb/avatar/driver/local.php +++ b/phpBB/phpbb/avatar/driver/local.php @@ -120,7 +120,6 @@ class local extends \phpbb\avatar\driver\driver if (empty($category) || empty($file)) { - $error[] = 'NO_AVATAR_SELECTED'; return false; } diff --git a/phpBB/phpbb/avatar/driver/upload.php b/phpBB/phpbb/avatar/driver/upload.php index edc5941602..e815b7a14d 100644 --- a/phpBB/phpbb/avatar/driver/upload.php +++ b/phpBB/phpbb/avatar/driver/upload.php @@ -130,7 +130,6 @@ class upload extends \phpbb\avatar\driver\driver } else { - $error[] = 'NO_AVATAR_SELECTED'; return false; } diff --git a/phpBB/styles/prosilver/template/ucp_avatar_options.html b/phpBB/styles/prosilver/template/ucp_avatar_options.html index ca077fdf5b..2cf9488ed0 100644 --- a/phpBB/styles/prosilver/template/ucp_avatar_options.html +++ b/phpBB/styles/prosilver/template/ucp_avatar_options.html @@ -17,7 +17,6 @@
- diff --git a/phpBB/styles/subsilver2/template/ucp_profile_avatar.html b/phpBB/styles/subsilver2/template/ucp_profile_avatar.html index fc52c149c6..8b1e8cffac 100644 --- a/phpBB/styles/subsilver2/template/ucp_profile_avatar.html +++ b/phpBB/styles/subsilver2/template/ucp_profile_avatar.html @@ -28,7 +28,6 @@ {L_AVATAR_TYPE}{L_COLON}