X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Fclass_pluglist.inc;h=f6267beb2fdf5cce01e29f6cb9de856a5a4b4343;hb=01f642762ae65b3e4fee377c5a95ea9a901b389c;hp=c29dfde116dffe04c1fbd6f56ce917609ff0a3ea;hpb=da6de1ed136c1659d451e61cf00b950b7cf2e249;p=gosa.git diff --git a/include/class_pluglist.inc b/include/class_pluglist.inc index c29dfde11..f6267beb2 100644 --- a/include/class_pluglist.inc +++ b/include/class_pluglist.inc @@ -137,7 +137,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&reset=1"; @@ -235,7 +235,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."&reset=1"; @@ -299,9 +299,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)); + } } ?>