From 824df0fe70494f80e78846315714a38765ee1221 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 26 Feb 2010 09:45:50 +0000 Subject: [PATCH] Updated pluglist git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15733 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_pluglist.inc | 59 ++++++++++++++++------------ 1 file changed, 33 insertions(+), 26 deletions(-) diff --git a/gosa-core/include/class_pluglist.inc b/gosa-core/include/class_pluglist.inc index 0cf5f9fdc..0e37c5daa 100644 --- a/gosa-core/include/class_pluglist.inc +++ b/gosa-core/include/class_pluglist.inc @@ -133,28 +133,6 @@ class pluglist { } - /*! \brief Generates an array containing plugin names (headlines) and theirs ids. - * This is just used in the helpviewer.php - */ - function gen_headlines() - { - $ret = array(); - if(count($this->headlines) == 0){ - foreach($this->config->data['MENU'] as $headline => $plugins){ - foreach( $plugins as $id => $plug){ - if (plugin_available($plug['CLASS'])){ - $attrs = (get_class_vars($plug['CLASS'])); - $ret[$id]['HEADLINE'] = $headline; - $ret[$id]['NAME'] = $attrs['plHeadline']; - } - } - } - $this->headlines = $ret; - } - return($this->headlines); - } - - /*! \brief Check the accessibility of the configured plugins. * We may simply have now permissions to access some plugins * but some may be broken or missing!. @@ -224,9 +202,7 @@ class pluglist { $this->allowed_plugins[$index] = $index; $class= ""; if($id == count($plug)) $class=" class='menu-last' \n "; - $menu .= "\n
  • ".$plHeadline."
  • "; + $menu .= "\n
  • ".$plHeadline."
  • "; } $menu.= "\n "; $menu.= "\n
    \n"; @@ -238,6 +214,17 @@ class pluglist { $this->menu = $menu; } + // Add javascript method to print out warning messages while leaving an unsaved form. + // We do it in here to get the string translated. + $this->menu .= " + + "; + // Return the generated/cached gosa menu. return ($this->menu); } @@ -368,7 +355,6 @@ class pluglist { if(!isset($this->dirlist[$index])){ return (""); } - echo "../".$this->dirlist[$index]; return ("../".$this->dirlist[$index]); } @@ -409,6 +395,27 @@ class pluglist { $this->iconmenu =""; } + + /*! \brief Generates an array containing plugin names (headlines) and theirs ids. + * This is just used in the helpviewer.php + */ + function gen_headlines() + { + $ret = array(); + if(count($this->headlines) == 0){ + foreach($this->config->data['MENU'] as $headline => $plugins){ + foreach( $plugins as $id => $plug){ + if (plugin_available($plug['CLASS'])){ + $attrs = (get_class_vars($plug['CLASS'])); + $ret[$id]['HEADLINE'] = $headline; + $ret[$id]['NAME'] = $attrs['plHeadline']; + } + } + } + $this->headlines = $ret; + } + return($this->headlines); + } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?> -- 2.30.2