Code

Updated logview.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 22 Apr 2008 09:52:25 +0000 (09:52 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 22 Apr 2008 09:52:25 +0000 (09:52 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@10614 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/addons/logview/class_logview.inc

index 4aee004713ff57fd1a7cb14ed1c92e072034eda5..ce6947d1cfe9f9957b20b2112843a85bf8567e9e 100644 (file)
@@ -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)));