From 8f57629998102b356aad25ff529986600458336d Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 14 Nov 2005 13:36:29 +0000 Subject: [PATCH] Changed handling for categories git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1943 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/applications/class_applicationGeneric.inc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/plugins/admin/applications/class_applicationGeneric.inc b/plugins/admin/applications/class_applicationGeneric.inc index 858408aad..ccafb6573 100644 --- a/plugins/admin/applications/class_applicationGeneric.inc +++ b/plugins/admin/applications/class_applicationGeneric.inc @@ -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)); } } -- 2.30.2