1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-10 02:36:38 +02:00

[feature/avatars] Miscellaneous fixes

PHPBB3-10018
This commit is contained in:
Marc Alexander
2012-11-25 01:18:27 +01:00
parent 7945ffa2a1
commit ce5e2f1677
7 changed files with 30 additions and 27 deletions

View File

@@ -56,11 +56,10 @@ class phpbb_avatar_driver_gravatar extends phpbb_avatar_driver
*/
public function get_custom_html($row, $ignore_config = false, $alt = '')
{
$html = '<img src="' . $this->get_gravatar_url($row) . '" ' .
return '<img src="' . $this->get_gravatar_url($row) . '" ' .
($row['avatar_width'] ? ('width="' . $row['avatar_width'] . '" ') : '') .
($row['avatar_height'] ? ('height="' . $row['avatar_height'] . '" ') : '') .
'alt="' . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . '" />';
return $html;
}
/**
@@ -121,7 +120,7 @@ class phpbb_avatar_driver_gravatar extends phpbb_avatar_driver
$row['avatar_width'] = $row['avatar_height'] = min($this->config['avatar_max_width'], $this->config['avatar_max_height']);
$url = $this->get_gravatar_url($row);
if (($row['avatar_width'] <= 0 || $row['avatar_height'] <= 0) && (($image_data = @getimagesize($url)) === false))
if (($row['avatar_width'] <= 0 || $row['avatar_height'] <= 0) && (($image_data = getimagesize($url)) === false))
{
$error[] = 'UNABLE_GET_IMAGE_SIZE';
return false;

View File

@@ -106,7 +106,7 @@ class phpbb_avatar_driver_remote extends phpbb_avatar_driver
// Make sure getimagesize works...
if (function_exists('getimagesize'))
{
if (($width <= 0 || $height <= 0) && (($image_data = @getimagesize($url)) === false))
if (($width <= 0 || $height <= 0) && (($image_data = getimagesize($url)) === false))
{
$error[] = 'UNABLE_GET_IMAGE_SIZE';
return false;