1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-18 22:41:28 +02:00

Merge remote-tracking branch 'github-marc1706/ticket/12822' into develop-ascraeus

* github-marc1706/ticket/12822:
  [ticket/12822] Fix test runs of avatar manager_test
  [ticket/12822] Add method for deleting avatars and use confirm_box
  [ticket/12822] Remove "None" option from avatar select boxes
This commit is contained in:
Nils Adermann
2014-08-11 17:37:56 +02:00
22 changed files with 238 additions and 113 deletions

View File

@@ -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);

View File

@@ -120,7 +120,6 @@ class local extends \phpbb\avatar\driver\driver
if (empty($category) || empty($file))
{
$error[] = 'NO_AVATAR_SELECTED';
return false;
}

View File

@@ -53,6 +53,11 @@ class remote extends \phpbb\avatar\driver\driver
$width = $request->variable('avatar_remote_width', 0);
$height = $request->variable('avatar_remote_height', 0);
if (empty($url))
{
return false;
}
if (!preg_match('#^(http|https|ftp)://#i', $url))
{
$url = 'http://' . $url;

View File

@@ -129,7 +129,6 @@ class upload extends \phpbb\avatar\driver\driver
}
else
{
$error[] = 'NO_AVATAR_SELECTED';
return false;
}