From 005cacf0be930151c20a75b148053a50b3e8630e Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 26 Aug 2005 10:20:37 +0000 Subject: [PATCH] Added check git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1226 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../class_kioskManagementDialog.inc | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/plugins/personal/environment/class_kioskManagementDialog.inc b/plugins/personal/environment/class_kioskManagementDialog.inc index 4b2611781..3d00450b6 100644 --- a/plugins/personal/environment/class_kioskManagementDialog.inc +++ b/plugins/personal/environment/class_kioskManagementDialog.inc @@ -76,15 +76,16 @@ class kioskManagementDialog extends plugin function getKioskProfiles() { - $dir = opendir($this->baseDir); - if(!file_exists($this->baseDir)){ - mkdir($this->baseDir); - } - $a_return = array(); - while($file = readdir($dir)){ - if(preg_match("/".$this->filePrefix."$/i",$file)){ - $name = preg_replace("/".$this->filePrefix."$/i","",$file);; - $a_return[$name] = $name; + $dir = @opendir($this->baseDir); + if(!dir){ + print_red(sprintf(_("Can't open %s permission denied."),$this->baseDir)); + }else{ + $a_return = array(); + while($file = readdir($dir)){ + if(preg_match("/".$this->filePrefix."$/i",$file)){ + $name = preg_replace("/".$this->filePrefix."$/i","",$file);; + $a_return[$name] = $name; + } } } return($a_return); -- 2.30.2