From 1bac9b4d3b92aeb28bec5219050208463a8d0ee1 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 25 Sep 2006 08:12:33 +0000 Subject: [PATCH] Added new topbox class git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4766 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_pluglist.inc | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) 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)); + } } ?> -- 2.30.2