浏览代码

Also output alt when its empty, closes #1512640

Thijs Kinkhorst 19 年之前
父节点
当前提交
9dbaa48664
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      templates/util_global.php

+ 2 - 1
templates/util_global.php

@@ -36,7 +36,8 @@ function getIcon($icon_theme_path, $icon_name, $text_icon, $alt_text='', $w=NULL
         // find an image, we will revert back to the text icon.
         // find an image, we will revert back to the text icon.
         if (!is_null($icon_path)) {
         if (!is_null($icon_path)) {
             $icon = '<img src="'.$icon_path.'" ' .
             $icon = '<img src="'.$icon_path.'" ' .
-                    (!empty($alt_text) ? 'alt="'.$alt_text.'" title="'.$alt_text.'" ' : '') .
+                    'alt="'.$alt_text.'" '.
+                    (!empty($alt_text) ? 'title="'.$alt_text.'" ' : '') .
                     (!is_null($w) ? 'width="'.$w.'" ' : '') .
                     (!is_null($w) ? 'width="'.$w.'" ' : '') .
                     (!is_null($h) ? 'height="'.$h.'" ' : '') .
                     (!is_null($h) ? 'height="'.$h.'" ' : '') .
                     ' />';
                     ' />';