1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 16:56:44 +02:00

[feature/avatars] Add more consistency to codebase

PHPBB3-10018
This commit is contained in:
Marc Alexander
2012-12-11 21:02:37 +01:00
parent 1aae72961a
commit 2f47c99432
7 changed files with 31 additions and 21 deletions

View File

@@ -77,13 +77,18 @@ class phpbb_avatar_driver_gravatar extends phpbb_avatar_driver
require($this->phpbb_root_path . 'includes/functions_user' . $this->php_ext);
}
$error = array_merge($error, validate_data(array(
'email' => $row['avatar'],
), array(
'email' => array(
array('string', false, 6, 60),
array('email')),
)));
$validate_array = validate_data(
array(
'email' => $row['avatar'],
),
array(
'email' => array(
array('string', false, 6, 60),
array('email'))
)
);
$error = array_merge($error, $validate_array);
if (!empty($error))
{

View File

@@ -66,11 +66,16 @@ class phpbb_avatar_driver_remote extends phpbb_avatar_driver
require($this->phpbb_root_path . 'includes/functions_user' . $this->php_ext);
}
$error = array_merge($error, validate_data(array(
'url' => $url,
), array(
'url' => array('string', true, 5, 255),
)));
$validate_array = validate_data(
array(
'url' => $url,
),
array(
'url' => array('string', true, 5, 255),
)
);
$error = array_merge($error, $validate_array);
if (!empty($error))
{