mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/17355] Change gravatar URL to new format
PHPBB-17355
This commit is contained in:
parent
40881b537e
commit
5013075af7
2 changed files with 3 additions and 3 deletions
|
@ -21,7 +21,7 @@ class gravatar extends \phpbb\avatar\driver\driver
|
||||||
/**
|
/**
|
||||||
* 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}
|
||||||
|
@ -175,7 +175,7 @@ class gravatar extends \phpbb\avatar\driver\driver
|
||||||
global $phpbb_dispatcher;
|
global $phpbb_dispatcher;
|
||||||
|
|
||||||
$url = self::GRAVATAR_URL;
|
$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'])
|
||||||
{
|
{
|
||||||
|
|
|
@ -207,7 +207,7 @@ class phpbb_avatar_driver_gravatar_test extends \phpbb_database_test_case
|
||||||
];
|
];
|
||||||
|
|
||||||
$this->assertEquals([
|
$this->assertEquals([
|
||||||
'src' => '//secure.gravatar.com/avatar/dc8a42aba3651b0b1f088ef928ff3b1d?s=70',
|
'src' => '//gravatar.com/avatar/e0ee9d02824d4320a999507150c5b8a371c635c41f645ba3a7205f36384dc199?s=70',
|
||||||
'width' => '70',
|
'width' => '70',
|
||||||
'height' => '60',
|
'height' => '60',
|
||||||
], $this->gravatar->get_data($row));
|
], $this->gravatar->get_data($row));
|
||||||
|
|
Loading…
Add table
Reference in a new issue