From e60e9de22be766a63fd427a05faa30d560c06f9e Mon Sep 17 00:00:00 2001 From: cajus Date: Thu, 6 Oct 2005 07:11:19 +0000 Subject: [PATCH] Corrected kioskpath parsing git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1493 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/personal/environment/class_environment.inc | 4 +--- .../environment/class_kioskManagementDialog.inc | 11 +++++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc index 7795b5ea8..6ec5f58fc 100644 --- a/plugins/personal/environment/class_environment.inc +++ b/plugins/personal/environment/class_environment.inc @@ -175,8 +175,6 @@ class environment extends plugin All these tab management is done here */ - print_a($this); - /* Working from Usermenu an the Account is currently disbled * this->parent : is only set if we are working in a list of tabs * is_account : is only true if the needed objectClass is given @@ -654,7 +652,7 @@ class environment extends plugin $realyUsedAttrs= array(); - $path = search_config($this->config->data['MENU'],"environment", "KIOSKPATH"); + $path = search_config($this->config->data,"environment", "KIOSKPATH"); /* Creating Kiosk Profiles */ foreach($this->newKioskProfiles as $file){ $contents = $file['contents']; diff --git a/plugins/personal/environment/class_kioskManagementDialog.inc b/plugins/personal/environment/class_kioskManagementDialog.inc index 428bab2cf..27f5e4291 100644 --- a/plugins/personal/environment/class_kioskManagementDialog.inc +++ b/plugins/personal/environment/class_kioskManagementDialog.inc @@ -22,7 +22,7 @@ class kioskManagementDialog extends plugin if($attach){ $this->filesToAttach = $attach; } - $this->baseDir = search_config($this->config->data['MENU'],"environment", "KIOSKPATH"); + $this->baseDir = search_config($this->config->data,"environment", "KIOSKPATH"); } function execute() @@ -75,9 +75,16 @@ class kioskManagementDialog extends plugin function getKioskProfiles($attach = false) { $a_return = array(); + + /* Empty? */ + if ($this->baseDir == ""){ + print_red(_("There is no KIOSKPATH defined in your gosa.conf. Can't manage kiosk profiles!")); + return ($a_return); + } + $dir = @opendir($this->baseDir); if(!$dir){ - print_red(sprintf(_("Can't open kiosk_path '%s'. Error was: permission denied. Possibly there is no kiosk_path defined in the configuration file."),$this->baseDir)); + print_red(sprintf(_("Kiosk path '%s' is not accessible. Please check the permissions."),$this->baseDir)); }else{ $a_return = array(); while($file = readdir($dir)){ -- 2.30.2