phpBB

Code Changes

File: phpbb/avatar/driver/gravatar.php

  Unmodified   Added   Modified   Removed
Line 21Line 21
	/**
* The URL for the gravatar service
*/

	/**
* The URL for the gravatar service
*/

	const GRAVATAR_URL = '//secure.gravatar.com/avatar/';

	const GRAVATAR_URL = '//gravatar.com/avatar/';


/**
* {@inheritdoc}


/**
* {@inheritdoc}

Line 29Line 29
	public function get_data($row)
{
return array(

	public function get_data($row)
{
return array(

			'src' => $row['avatar'],

			'src' => $this->get_gravatar_url($row),

			'width' => $row['avatar_width'],
'height' => $row['avatar_height'],
);

			'width' => $row['avatar_width'],
'height' => $row['avatar_height'],
);

Line 53Line 53
	{
$template->assign_vars(array(
'AVATAR_GRAVATAR_WIDTH' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar_width']) ? $row['avatar_width'] : $request->variable('avatar_gravatar_width', ''),

	{
$template->assign_vars(array(
'AVATAR_GRAVATAR_WIDTH' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar_width']) ? $row['avatar_width'] : $request->variable('avatar_gravatar_width', ''),

			'AVATAR_GRAVATAR_HEIGHT' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar_height']) ? $row['avatar_height'] : $request->variable('avatar_gravatar_width', ''),

			'AVATAR_GRAVATAR_HEIGHT' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar_height']) ? $row['avatar_height'] : $request->variable('avatar_gravatar_height', ''),

			'AVATAR_GRAVATAR_EMAIL' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar']) ? $row['avatar'] : '',
));


			'AVATAR_GRAVATAR_EMAIL' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar']) ? $row['avatar'] : '',
));


Line 175Line 175
		global $phpbb_dispatcher;

$url = self::GRAVATAR_URL;

		global $phpbb_dispatcher;

$url = self::GRAVATAR_URL;

		$url .=  md5(strtolower(trim($row['avatar'])));

		$url .= hash('sha256', strtolower(trim($row['avatar'])));


if ($row['avatar_width'] || $row['avatar_height'])
{


if ($row['avatar_width'] || $row['avatar_height'])
{