Code

Fixed broken fetch() call on non existing resources.
[gosa.git] / include / class_config.inc
index ce92a8b30d6d464461bfd44fab1c46f68297c03b..92c87511716d8da745d968cd700fa5d413b3c131 100644 (file)
@@ -38,7 +38,7 @@ class config  {
 
   /* Configuration data */
   var $data= array( 'TABS' => array(), 'LOCATIONS' => array(), 'SERVERS' => array(),
-      'MAIN' => array( 'FAXFORMATS' => array() ),
+      'MAIN' => array(),
       'MENU' => array(), 'SERVICE' => array());
   var $basedir= "";
 
@@ -68,6 +68,14 @@ class config  {
   function check_and_reload()
   {
     if($this->filename != "" && filemtime($this->filename) != $this->last_modified){
+
+      $this->config_found= FALSE;
+      $this->tags= array();
+      $this->level= 0;
+      $this->gpc= 0;
+      $this->section= "";
+      $this->currentLocation= "";
+
       $this->parser = xml_parser_create();
       xml_set_object($this->parser, $this);
       xml_set_element_handler($this->parser, "tag_open", "tag_close");
@@ -168,14 +176,6 @@ class config  {
                   }
                   break;
 
-                  /* Handle faxformat */
-      case 'FAXFORMAT':        
-                  if ($this->tags[$this->level-2] == 'MAIN'){
-                    /* Add fax formats */
-                    $this->data['MAIN']['FAXFORMATS'][]= $attrs['TYPE'];
-                  }
-                  break;
-
                   /* Load main parameters */
       case 'MAIN':
                   $this->data['MAIN']= array_merge ($this->data['MAIN'], $attrs);