Code

Updated gosa log view, fixed undefined index,.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 3 Feb 2009 11:07:44 +0000 (11:07 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 3 Feb 2009 11:07:44 +0000 (11:07 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13377 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/log/addons/logview/class_gosa_logview.inc

index 794ab8af832e0387950742fc63dcfb61a098d261..0c6b0e515ad5d0bd767468c3938d4b8de4431594 100644 (file)
@@ -110,19 +110,21 @@ class gosa_logview extends plugin
       $smarty->assign("$type", $this->$type);
     }
 
-    /**** 
-     * Check if defined servers 
-     *  and mysql extension 
-     ****/
-    if (!isset($this->config->data['SERVERS']['LOGGING']) || !count($this->config->data['SERVERS']['LOGGING'])){
-      msg_dialog::display(_("Warning"), msgPool::noserver("GOsa log"), WARNING_DIALOG);
-      return ($smarty->fetch (get_template_path('gosa_log_contents.tpl', TRUE)));
-    }
-    
-    if(!is_callable("mysql_connect")){
-      msg_dialog::display(_("Configuration error"), sprintf(_("Missing %s PHP extension!"), "mysql"), WARNING_DIALOG);
-      return ($smarty->fetch (get_template_path('gosa_log_contents.tpl', TRUE)));
-    }
+  /**** 
+   * Check if defined servers 
+   *  and mysql extension 
+   ****/
+  if (!isset($this->config->data['SERVERS']['LOGGING']) || !count($this->config->data['SERVERS']['LOGGING'])){
+    msg_dialog::display(_("Warning"), msgPool::noserver("GOsa log"), WARNING_DIALOG);
+    $smarty->assign("servers", array());
+    return ($smarty->fetch (get_template_path('gosa_log_contents.tpl', TRUE)));
+  }
+  
+  if(!is_callable("mysql_connect")){
+    msg_dialog::display(_("Configuration error"), sprintf(_("Missing %s PHP extension!"), "mysql"), WARNING_DIALOG);
+    $smarty->assign("servers", array());
+    return ($smarty->fetch (get_template_path('gosa_log_contents.tpl', TRUE)));
+  }
 
     /****
      * Get Configurations