From 91fbcf2e1d85a99a130caaa9d380d517b9f4c919 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 22 Apr 2008 09:52:25 +0000 Subject: [PATCH] Updated logview. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@10614 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/addons/logview/class_logview.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/addons/logview/class_logview.inc b/plugins/addons/logview/class_logview.inc index 4aee00471..ce6947d1c 100644 --- a/plugins/addons/logview/class_logview.inc +++ b/plugins/addons/logview/class_logview.inc @@ -248,8 +248,7 @@ class logview extends plugin } $smarty->assign("mode".$this->sort, $sort_sign); - $end= date ("YmdHis"); - $query_base= " FROM golog WHERE message like '".$logfilter['regex']."' $ll $hf AND time_stamp <= $end AND time_stamp >= $start"; + $query_base= " FROM golog WHERE message like '".$logfilter['regex']."' $ll $hf AND time_stamp >= $start"; /* Get number of entries */ $query= "SELECT COUNT(*)".$query_base.";"; @@ -286,6 +285,10 @@ class logview extends plugin $smarty->assign("search_result", $res); } } + $logfilter['regex']= preg_replace('/\%/', '*', $logfilter['regex']); + foreach( array("host", "log_level", "time", "regex") as $type){ + $smarty->assign("$type", $logfilter[$type]); + } /* Show main page */ return ($smarty->fetch (get_template_path('contents.tpl', TRUE))); -- 2.30.2