Code

Added possibility to define other icons than "plugin.png" for menu display
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 5 May 2008 16:02:04 +0000 (16:02 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 5 May 2008 16:02:04 +0000 (16:02 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10773 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_pluglist.inc

index b4a35ba4af39b111824b16021887f916e30ff43a..1b311a778dba2502f1957e87df306c7c3bbeb2a2 100644 (file)
@@ -264,6 +264,11 @@ class pluglist {
                                        $vars= get_class_vars($info['CLASS']);
                                        $plHeadline= $vars['plHeadline'];
                                        $plDescription= $vars['plDescription'];
+          if (isset($vars['plIcon'])){
+                                       $plIcon= $vars['plIcon'];
+          } else {
+                                       $plIcon= "plugin.png";
+          }
 
                                        $index= $this->get_index($info['CLASS']);
 
@@ -284,7 +289,7 @@ class pluglist {
                                                if (isset($info['ICON'])){
                                                        $image= get_template_path('images/'.$info['ICON']);
                                                } else {
-                                                       $image= get_template_path("plugins/".preg_replace('%^.*/([^/]+)/[^/]+$%', '\1', $class_mapping[$info['CLASS']])."/images/plugin.png");
+                                                       $image= get_template_path("plugins/".preg_replace('%^.*/([^/]+)/[^/]+$%', '\1', $class_mapping[$info['CLASS']])."/images/$plIcon");
                                                }
                                                if ($col > 5){
                                                        $entries= $entries."</tr><tr>";