X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Fclass_pluglist.inc;h=f6267beb2fdf5cce01e29f6cb9de856a5a4b4343;hb=01f642762ae65b3e4fee377c5a95ea9a901b389c;hp=81048f1489f1ebbab93de532877844fa1e989752;hpb=640b2ded1efaf5732e5cdfdcbf29ea0429a651de;p=gosa.git diff --git a/include/class_pluglist.inc b/include/class_pluglist.inc index 81048f148..f6267beb2 100644 --- a/include/class_pluglist.inc +++ b/include/class_pluglist.inc @@ -46,6 +46,12 @@ class pluglist { $this->info[$cname]= @call_user_func(array($cname, 'plInfo')); } } + + /* Provide field for 'all' */ + $this->info['all']= array(); + $this->info['all']['plProvidedAcls']= array(); + $this->info['all']['plDescription']= _("All objects in this category"); + $this->info['all']['plSelfModify']= FALSE; } function get_plugins($list, $config) @@ -131,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"; @@ -229,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"; @@ -293,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)); + } } ?>