1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 20:13:22 +01:00

Merge branch '3.1.x'

* 3.1.x:
  [ticket/14191] Add core.get_gravatar_url_after event
This commit is contained in:
Tristan Darricau 2015-10-12 11:32:05 +02:00
commit af1597ae25

View File

@ -172,6 +172,8 @@ class gravatar extends \phpbb\avatar\driver\driver
*/
protected function get_gravatar_url($row)
{
global $phpbb_dispatcher;
$url = self::GRAVATAR_URL;
$url .= md5(strtolower(trim($row['avatar'])));
@ -180,6 +182,17 @@ class gravatar extends \phpbb\avatar\driver\driver
$url .= '?s=' . max($row['avatar_width'], $row['avatar_height']);
}
/**
* Modify gravatar url
*
* @event core.get_gravatar_url_after
* @var string row User data or group data
* @var string url Gravatar URL
* @since 3.1.7-RC1
*/
$vars = array('row', 'url');
extract($phpbb_dispatcher->trigger_event('core.get_gravatar_url_after', compact($vars)));
return $url;
}
}