From: hickert Date: Fri, 26 Aug 2005 10:20:37 +0000 (+0000) Subject: Added check X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=005cacf0be930151c20a75b148053a50b3e8630e;p=gosa.git Added check git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1226 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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);