All images must have an alternate text.
[squirrelmail.git] / functions / template / general_util.php
index 48db0e6852069b41f55331fdf230e19c363f34fb..1711c15537a220a4bdbff6bfc8ae863a602f3d71 100644 (file)
   * @param boolean $alt       Whether or not this is an alternate 
   *                           stylesheet (optional; default TRUE).
   * @param string  $mtype     The target media display type (optional; default "screen").
-  * @param string  $xhtml_end The XHTML-compliant close tag syntax to 
-  *                           use (optional; default "/")
   *
   * @return string The full text of the stylesheet link.
   *
   */
-function create_css_link($uri, $name='', $alt=TRUE, $mtype='screen', $xhtml_end='/') {
+function create_css_link($uri, $name='', $alt=TRUE, $mtype='screen') {
 // FIXME: Add closing / to link and meta elements only after 
 //        switching to xhtml 1.0 Transitional.
 //        It is not compatible with html 4.01 Transitional
-$xhtml_end='';
-
     if (empty($uri)) {
         return '';
     }
@@ -72,7 +68,7 @@ $xhtml_end='';
         $rel   = 'rel="'.( $alt ? 'alternate ' : '' ).'stylesheet" ';
     }
 
-    return '<link '.$media.$title.$rel.'type="text/css" '.$href." $xhtml_end>\n";
+    return '<link '.$media.$title.$rel.'type="text/css" '.$href." />\n";
 }
 
 
@@ -83,7 +79,7 @@ $xhtml_end='';
  * @param string $icon_theme_path User's chosen icon set
  * @param string $icon_name File name of the desired icon
  * @param string $text_icon Text-based icon to display if desired
- * @param string $alt_text Optional.  Text for alt/title attribute of image
+ * @param string $alt_text Text for alt/title attribute of image
  * @param integer $w Optional.  Width of requested image.
  * @param integer $h Optional.  Height of requested image.
  *
@@ -91,9 +87,8 @@ $xhtml_end='';
  *
  * @author Steve Brown
  * @since 1.5.2
- *
  */
-function getIcon($icon_theme_path, $icon_name, $text_icon, $alt_text='', $w=NULL, $h=NULL) {
+function getIcon($icon_theme_path, $icon_name, $text_icon, $alt_text, $w=NULL, $h=NULL) {
     $icon = '';
     if (is_null($icon_theme_path)) {
         $icon = $text_icon;
@@ -103,7 +98,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 = create_image($icon_path, $alt_text, $w, $h, '', '', '', '', $alt_text);
+            $icon = create_image($icon_path, $alt_text, $w, $h, '', '', '', 
+                                 '', $alt_text, '', '', '', $text_icon);
         } else {
             $icon = $text_icon;
         }
@@ -176,5 +172,3 @@ function displayErrors () {
 function humanReadableSize ($size) {
     return show_readable_size($size);
 }
-
-