Browse Source

Feature #2785 enable function and support for 22px

Juan Carlos Raña 14 years ago
parent
commit
9113bfb60a
2 changed files with 10 additions and 4 deletions
  1. 6 0
      main/img/icons/22/index.html
  2. 4 4
      main/inc/lib/display.lib.php

+ 6 - 0
main/img/icons/22/index.html

@@ -0,0 +1,6 @@
+<html>
+<head>
+</head>
+<body>
+</body>
+</html>

+ 4 - 4
main/inc/lib/display.lib.php

@@ -652,15 +652,16 @@ class Display {
 	public static function return_icon($image, $alt_text = '', $additional_attributes = array(), $size=null) {
         $code_path = api_get_path(SYS_CODE_PATH);
         $w_code_path = api_get_path(WEB_CODE_PATH);
-        /*
+        
         $theme = 'css/'.api_get_visual_theme().'/icons/';
         $icon = '';
         $size_extra = '';
         if (isset($size)) {
-            if (in_array($size,array(16,32,64,128))) {
+            if (in_array($size,array(16,22,32,64,128))) {
             	$size_extra = $size.'/';
             }
         }
+
         if (is_file($code_path.$theme.$size_extra.$image)) {
         	$icon = $w_code_path.$theme.$size_extra.$image;
         } elseif (is_file($code_path.'img/icons/'.$size_extra.$image)) {
@@ -668,8 +669,7 @@ class Display {
         } else {
         	$icon = $w_code_path.'img/'.$image;
         }
-        */
-        $icon = $w_code_path.'img/'.$image;
+
         return self::img($icon, $alt_text,$additional_attributes);
 	}