Code

Style fixes
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 22 Sep 2006 11:49:34 +0000 (11:49 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 22 Sep 2006 11:49:34 +0000 (11:49 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4765 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_pluglist.inc

index 42f729db8992deab90bdb9f049bb8ab3fb9a4fc0..631c2cf15bcc4638e9b1292636b088aed0cf3092 100644 (file)
@@ -121,7 +121,7 @@ class pluglist {
                                        $plDescription= $vars['plDescription'];
 
 
-                                       $index= $this->get_index($info['PATH']);
+                                       $index= $this->get_index($info['PATH'],$info['CLASS']);
                                        $image= get_template_path('images/'.$info['ICON']);
                                        $href= "main.php?plug=$index&amp;reset=1";
 
@@ -219,7 +219,7 @@ class pluglist {
                                        $plHeadline= $vars['plHeadline'];
                                        $plDescription= $vars['plDescription'];
 
-                                       $index= $this->get_index($info['PATH']);
+                                       $index= $this->get_index($info['PATH'],$info['CLASS']);
 
                                        $href = "main.php?plug=".$index."&amp;reset=1";
 
@@ -283,9 +283,21 @@ class pluglist {
                return ("../".$this->dirlist[$index]);
        }
 
-       function get_index($path)
+       function get_index($path,$class)
        {
-               return (array_search($path, $this->dirlist));
+               /* Search for plugin index (id), identify entry by path && class */
+                $data = $this->config->data['MENU'];
+                foreach($data as $section => $plugins){
+                        foreach($plugins as $key => $plugin)    {
+                                if($plugin['CLASS'] == $class && $plugin['PATH'] == $path){
+                                        return($key);
+                                }
+                        }
+                }
+
+               /* Indentify by path*/
+                return (array_search($path, $this->dirlist));
+
        }
 }
 ?>