Code

Made 'ALL' actions selectable
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 29 May 2007 08:22:38 +0000 (08:22 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 29 May 2007 08:22:38 +0000 (08:22 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6501 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/addons/logview/class_gosa_logview.inc

index 78369e88a263dc1f9106f10c373ffbb7af24eb17..742149ff769cac27d886ed0b8a54b009384a4966 100644 (file)
@@ -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;