Code

Do not warn about missing syslog definition with an extra error-dialog.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 19 Nov 2009 10:27:47 +0000 (10:27 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 19 Nov 2009 10:27:47 +0000 (10:27 +0000)
-Enables viewing GOsa logs without having warning messages everytime.

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

gosa-plugins/log/addons/logview/class_logview.inc
gosa-plugins/log/addons/logview/contents.tpl

index 75f6ed3d394a1914562a6538b8cc054f38fa1648..56d1beca1fa70184a50f8a5b151911954411695c 100644 (file)
@@ -68,6 +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']));
 
     /* Assign select option content */
     foreach( array("host", "log_level", "time", "regex") as $type){
@@ -76,7 +77,6 @@ class logview extends plugin
 
     /* Test connection to log database */
     if (!isset($this->config->data['SERVERS']['LOG'])){
-      msg_dialog::display(_("Warning"), msgPool::noserver("syslog"), WARNING_DIALOG);
       return ($smarty->fetch (get_template_path('contents.tpl', TRUE)));
 
     }elseif(!is_callable("mysql_connect")){
index 754adc4a7144546e8f76d8a1a79868595a55d3db..eb8676081651b9fdcaf37dea4ee420ed996a16f6 100644 (file)
  </table>
 
 {else}
+  {if $server_count}
   <b>{t}Search returned no results...{/t}</b>
+  {else}
+  <b>{msgPool type=noserver p1=syslog}</b>
+  {/if}
 {/if}
 
 <!-- Place cursor -->