Code

Udpated gosaLogView and logview
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 19 Nov 2009 10:32:06 +0000 (10:32 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 19 Nov 2009 10:32:06 +0000 (10:32 +0000)
-We may have only one service configured and do not wan't to see warning dialogs about missing cofigurations everytime

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14823 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/log/addons/logview/class_gosa_logview.inc
gosa-plugins/log/addons/logview/class_logview.inc
gosa-plugins/log/addons/logview/gosa_log_contents.tpl

index 0c6b0e515ad5d0bd767468c3938d4b8de4431594..d5b08b878313e273445307be6ef9f7a8b128ab8c 100644 (file)
@@ -104,18 +104,20 @@ class gosa_logview extends plugin
     $smarty->assign("mode4", "");
     $smarty->assign("mode5", "");
     $smarty->assign("mode6", "");
+    $smarty->assign("server_count",(isset($this->config->data['SERVERS']['LOGGING'])) && count($this->config->data['SERVERS']['LOGGING']));
 
     /* Assign select option content */
     foreach( array("server", "action", "time", "regex") as $type){
       $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);
+  if (!isset($this->config->data['SERVERS']['LidOGGING']) || !count($this->config->data['SERVERS']['LOGGING'])){
     $smarty->assign("servers", array());
     return ($smarty->fetch (get_template_path('gosa_log_contents.tpl', TRUE)));
   }
index 56d1beca1fa70184a50f8a5b151911954411695c..5d55711c69d8ddc9727028c02b9e362672eab007 100644 (file)
@@ -68,7 +68,7 @@ class logview extends plugin
     $smarty->assign("mode1", "");
     $smarty->assign("mode2", "");
     $smarty->assign("mode3", "");
-    $smarty->assign("server_count", isset($this->config->data['SERVERS']['LOG']));
+    $smarty->assign("server_count",(isset($this->config->data['SERVERS']['LOG'])) && count($this->config->data['SERVERS']['LOG']));
 
     /* Assign select option content */
     foreach( array("host", "log_level", "time", "regex") as $type){
index 5d71d8103d84cea736e181ea7fdd92d17ef2adcb..0e27553e765bab89fcbe5f9532cc32df8c4812b8 100644 (file)
  </table>
 
 {else}
+  {if $server_count}
   <b>{t}Search returned no results...{/t}</b>
+  {else}
+  <b>{msgPool type=noserver p1='GOsa Log'}</b>
+  {/if}
 {/if}
 <input type='hidden' name='gosa_log_contents_posted' value='1'>
 <!-- Place cursor -->