From fad41a68743a19afbd57cc32121b3f608f97e217 Mon Sep 17 00:00:00 2001 From: Cesar G Date: Sun, 4 May 2014 14:30:51 -0700 Subject: [PATCH] [ticket/12500] Set a title attribute in user.img() PHPBB3-12500 --- phpBB/phpbb/user.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/phpBB/phpbb/user.php b/phpBB/phpbb/user.php index f8e473dcad..591b5ca30d 100644 --- a/phpBB/phpbb/user.php +++ b/phpBB/phpbb/user.php @@ -795,8 +795,14 @@ class user extends \phpbb\session */ function img($img, $alt = '') { - $alt = (!empty($this->lang[$alt])) ? $this->lang[$alt] : $alt; - return '' . $alt . ''; + $title = ''; + + if ($alt) + { + $alt = $this->lang($alt); + $title = ' title="' . $alt . '"'; + } + return '' . $alt . ''; } /**