From 1eb617b3f0d83ad93084d27156eb9ae399bab81b Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 26 Nov 2010 15:15:00 +0000 Subject: [PATCH] Updated handling for infoPage git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20390 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/html/main.php | 14 +++++++++----- gosa-core/include/class_pluglist.inc | 25 +++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/gosa-core/html/main.php b/gosa-core/html/main.php index fc8669254..ded3e1156 100644 --- a/gosa-core/html/main.php +++ b/gosa-core/html/main.php @@ -184,8 +184,6 @@ if (!session::global_is_set('plist')){ } $plist= session::global_get('plist'); -print_a($plist); - /* Check for register globals */ if (isset($global_check) && $config->boolValueIsTrue("core","forceGlobals")){ msg_dialog::display( @@ -249,9 +247,15 @@ if (isset($_GET['plug']) && $plist->plugin_access_allowed($_GET['plug'])){ } } else { - /* set to welcome page as default plugin */ - session::global_set('plugin_dir',"welcome"); - $plugin_dir= "$BASE_DIR/plugins/generic/welcome"; + // Display the welcome page for admins (iconmenu) and an info page for those + // who are not allowed to adminstrate anything (user) + if(count($plist->getRegisteredMenuEntries()) == 0){ + session::global_set('plugin_dir',"infoPage"); + $plugin_dir= "$BASE_DIR/plugins/generic/infoPage"; + }else{ + session::global_set('plugin_dir',"welcome"); + $plugin_dir= "$BASE_DIR/plugins/generic/welcome"; + } } /* Handle plugin locks. diff --git a/gosa-core/include/class_pluglist.inc b/gosa-core/include/class_pluglist.inc index 4a1ecca57..d4475497a 100644 --- a/gosa-core/include/class_pluglist.inc +++ b/gosa-core/include/class_pluglist.inc @@ -52,6 +52,31 @@ class pluglist var $registeredIconEntries = array(); var $registeredShortCutEntries = array(); + + function getRegisteredMenuEntries () + { + return($this->registeredMenuEntries); + } + + + function getRegisteredPathEntries () + { + return($this->registeredPathEntries); + } + + + function getRegisteredIconEntries () + { + return($this->registeredIconEntries); + } + + + function getRegisteredShortCutEntries () + { + return($this->registeredShortCutEntries); + } + + function pluglist(&$config, &$ui) { $this->ui= &$ui; -- 2.30.2