Make compact paginator work on search results
[squirrelmail.git] / functions / template / general_util.php
index bcae35e9417dc07b7b1b95fd7f63250a7dde5a47..8ea12de51137256309db4dfc00383fe4965cacca 100644 (file)
@@ -77,7 +77,7 @@ $xhtml_end='';
 
 
 /**
- * Checks for an image icon and returns a complete HTML img tag or a text
+ * Checks for an image icon and returns a complete image tag or a text
  * string with the text icon based on what is found and user prefs.
  *
  * @param string $icon_theme_path User's chosen icon set
@@ -86,9 +86,12 @@ $xhtml_end='';
  * @param string $alt_text Optional.  Text for alt/title attribute of image
  * @param integer $w Optional.  Width of requested image.
  * @param integer $h Optional.  Height of requested image.
+ *
  * @return string $icon String containing icon that can be echo'ed
+ *
  * @author Steve Brown
  * @since 1.5.2
+ *
  */
 function getIcon($icon_theme_path, $icon_name, $text_icon, $alt_text='', $w=NULL, $h=NULL) {
     $icon = '';
@@ -100,12 +103,8 @@ function getIcon($icon_theme_path, $icon_name, $text_icon, $alt_text='', $w=NULL
         // If we found an icon, build an img tag to display it.  If we didn't
         // find an image, we will revert back to the text icon.
         if (!is_null($icon_path)) {
-            $icon = '<img src="'.$icon_path.'" ' .
-                    'alt="'.$alt_text.'" '.
-                    (!empty($alt_text) ? 'title="'.$alt_text.'" ' : '') .
-                    (!is_null($w) ? 'width="'.$w.'" ' : '') .
-                    (!is_null($h) ? 'height="'.$h.'" ' : '') .
-                    ' />';
+            $icon = create_image($icon_path, $alt_text, $w, $h, '', '', '', 
+                                 '', $alt_text, '', '', '', $text_icon);
         } else {
             $icon = $text_icon;
         }
@@ -121,10 +120,13 @@ function getIcon($icon_theme_path, $icon_name, $text_icon, $alt_text='', $w=NULL
  *
  * @param string $icon_theme_path User's chosen icon set
  * @param string $icon_name File name of the desired icon
+ *
  * @return string $icon String containing path to icon that can be used in
  *                      an IMG tag, or NULL if the image is not found.
+ *
  * @author Steve Brown
  * @since 1.5.2
+ *
  */
 function getIconPath ($icon_theme_path, $icon_name) {
     global $fallback_icon_theme_path;