diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-05-08 13:27:33 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-05-08 13:27:33 +0200 |
commit | dcfb4cacd86e4694e1938bc5f23a917eccf2b178 (patch) | |
tree | 1732ae8d0139ffa23d8baacb69c8f39216890543 /phpBB | |
parent | e976f7908a85623a7f7ce30f1366d0b52957f8b5 (diff) | |
parent | fad41a68743a19afbd57cc32121b3f608f97e217 (diff) | |
download | forums-dcfb4cacd86e4694e1938bc5f23a917eccf2b178.tar forums-dcfb4cacd86e4694e1938bc5f23a917eccf2b178.tar.gz forums-dcfb4cacd86e4694e1938bc5f23a917eccf2b178.tar.bz2 forums-dcfb4cacd86e4694e1938bc5f23a917eccf2b178.tar.xz forums-dcfb4cacd86e4694e1938bc5f23a917eccf2b178.zip |
Merge pull request #2408 from prototech/ticket/12500
[ticket/12500] Set a title attribute in user.img()
* prototech/ticket/12500:
[ticket/12500] Set a title attribute in user.img()
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>'; } /** |