From f02ca7419d13b4602c186e57e38239afd91eef72 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 19 Nov 2009 10:27:47 +0000 Subject: [PATCH] Do not warn about missing syslog definition with an extra error-dialog. -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 | 2 +- gosa-plugins/log/addons/logview/contents.tpl | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gosa-plugins/log/addons/logview/class_logview.inc b/gosa-plugins/log/addons/logview/class_logview.inc index 75f6ed3d3..56d1beca1 100644 --- a/gosa-plugins/log/addons/logview/class_logview.inc +++ b/gosa-plugins/log/addons/logview/class_logview.inc @@ -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")){ diff --git a/gosa-plugins/log/addons/logview/contents.tpl b/gosa-plugins/log/addons/logview/contents.tpl index 754adc4a7..eb8676081 100644 --- a/gosa-plugins/log/addons/logview/contents.tpl +++ b/gosa-plugins/log/addons/logview/contents.tpl @@ -94,7 +94,11 @@ {else} + {if $server_count} {t}Search returned no results...{/t} + {else} + {msgPool type=noserver p1=syslog} + {/if} {/if} -- 2.30.2