Code

Changed handling for categories
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 14 Nov 2005 13:36:29 +0000 (13:36 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 14 Nov 2005 13:36:29 +0000 (13:36 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1943 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/applications/class_applicationGeneric.inc

index 858408aad1b4e6aeda41a52d2ff3794931f8b420..ccafb657392c93e4b67c45349a604d590a56a240 100644 (file)
@@ -34,16 +34,19 @@ class application extends plugin
 
        $tmp = new xmlParse();
        
+       $this->Categories= array();
        if(!isset($this->config->data['MAIN']['KDE_APPLICATIONS_MENU']))        {
                print_red(_("There is no value for 'KDE_APPLICATIONS_MENU' specified in your gosa.conf."));
-               $this->Categories= array();
        }else{
                $path = $this->config->data['MAIN']['KDE_APPLICATIONS_MENU'];
                if(file_exists($path)){
-                       $tmp->parseMenu($path);
-                       $this->Categories = $tmp->GetData();
+                       if(is_readable($path)){
+                               $tmp->parseMenu($path);
+                               $this->Categories = $tmp->GetData();
+                       }else{
+                               print_red(sprintf(_("The specified file '%s' for 'KDE_APPLICATIONS_MENU' in your gosa.conf is not accessable."),$path));
+                       }
                }else{
-                       $this->Categories= array();
                        print_red(sprintf(_("The specified file '%s' for 'KDE_APPLICATIONS_MENU' in your gosa.conf is not accessable."),$path));
                }
        }