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

[feature/avatars] Properly implement custom HTML in the interface

Previously the driver class added a variable that defined wether an avatar
driver would return custom HTML. The existence of this variable was
implied in the interface. It's also not needed which is why it has been
removed.

PHPBB3-10018
This commit is contained in:
Marc Alexander
2012-11-29 23:08:29 +01:00
parent cb1d98ab7f
commit 81a1a21185
4 changed files with 7 additions and 17 deletions

View File

@@ -1368,12 +1368,14 @@ function get_avatar($row, $alt, $ignore_config = false)
$phpbb_avatar_manager = $phpbb_container->get('avatar.manager');
$avatar = $phpbb_avatar_manager->get_driver($row['avatar_type']);
$html = '';
if ($avatar)
{
if ($avatar->custom_html)
$html = $avatar->get_custom_html($row, $ignore_config, $alt);
if (!empty($html))
{
return $avatar->get_custom_html($row, $ignore_config, $alt);
return $html;
}
$avatar_data = $avatar->get_data($row, $ignore_config);
@@ -1383,8 +1385,6 @@ function get_avatar($row, $alt, $ignore_config = false)
$avatar_data['src'] = '';
}
$html = '';
if (!empty($avatar_data['src']))
{
$html = '<img src="' . $avatar_data['src'] . '" ' .