diff options
author | Cesar G <prototech91@gmail.com> | 2014-05-04 14:30:51 -0700 |
---|---|---|
committer | Cesar G <prototech91@gmail.com> | 2014-05-04 14:30:51 -0700 |
commit | fad41a68743a19afbd57cc32121b3f608f97e217 (patch) | |
tree | abcd59970f2fe17cb26b71fc242b94f9a4f31e52 /phpBB | |
parent | 6cca7d0443a833c3e6b11c30bdfadc5f6d78c7f1 (diff) | |
download | forums-fad41a68743a19afbd57cc32121b3f608f97e217.tar forums-fad41a68743a19afbd57cc32121b3f608f97e217.tar.gz forums-fad41a68743a19afbd57cc32121b3f608f97e217.tar.bz2 forums-fad41a68743a19afbd57cc32121b3f608f97e217.tar.xz forums-fad41a68743a19afbd57cc32121b3f608f97e217.zip |
[ticket/12500] Set a title attribute in user.img()
PHPBB3-12500
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/phpbb/user.php | 10 |
1 files 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 '<span class="imageset ' . $img . '">' . $alt . '</span>'; + $title = ''; + + if ($alt) + { + $alt = $this->lang($alt); + $title = ' title="' . $alt . '"'; + } + return '<span class="imageset ' . $img . '"' . $title . '>' . $alt . '</span>'; } /** |