From: hickert Date: Tue, 29 May 2007 08:22:38 +0000 (+0000) Subject: Made 'ALL' actions selectable X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f68264c366f1a7c0344d9fe0a943d9588967c7d0;p=gosa.git Made 'ALL' actions selectable git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6501 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/addons/logview/class_gosa_logview.inc b/plugins/addons/logview/class_gosa_logview.inc index 78369e88a..742149ff7 100644 --- a/plugins/addons/logview/class_gosa_logview.inc +++ b/plugins/addons/logview/class_gosa_logview.inc @@ -140,7 +140,7 @@ class gosa_logview extends plugin * Get all action types ****/ - $actions = array(); + $actions = array("!ALL" => _("All")); $query = "SELECT distinct(action) FROM gosa_log;"; $res = @mysql_query($query); while($attrs = @mysql_fetch_assoc($res)){ @@ -204,9 +204,17 @@ class gosa_logview extends plugin $query_base= " FROM gosa_log WHERE - result like '".preg_replace("/\*/","%",$this->regex)."' - AND - action like '".$this->action."' + result like '".preg_replace("/\*/","%",$this->regex)."' "; + + + if($this->action != "!ALL"){ + $query_base .=" + AND + action like '".$this->action."' + "; + } + + $query_base .=" AND timestamp <= $end AND timestamp >= $start"; @@ -314,6 +322,7 @@ class gosa_logview extends plugin $this->sort_direction= "down"; } } + $this->sort= (int)$_GET['sort']; if ($this->sort < 0 || $this->sort > 3){ $this->sort= 0;