1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-01 12:05:37 +02:00

[ticket/12500] Set a title attribute in user.img()

PHPBB3-12500
This commit is contained in:
Cesar G 2014-05-04 14:30:51 -07:00
parent 6cca7d0443
commit fad41a6874

View File

@ -795,8 +795,14 @@ class user extends \phpbb\session
*/
function img($img, $alt = '')
{
$alt = (!empty($this->lang[$alt])) ? $this->lang[$alt] : $alt;
return '<span class="imageset ' . $img . '">' . $alt . '</span>';
$title = '';
if ($alt)
{
$alt = $this->lang($alt);
$title = ' title="' . $alt . '"';
}
return '<span class="imageset ' . $img . '"' . $title . '>' . $alt . '</span>';
}
/**