Code

Some debugging changes
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 30 Jun 2010 15:11:07 +0000 (15:11 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 30 Jun 2010 15:11:07 +0000 (15:11 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18894 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/rsyslog/addons/rsyslog/class_rsyslog.inc

index e90d0c4dbc2adccfae90c536ed23b7de7b07349e..9fce8c7682a446dbda7d991ed33fba7e9d0bfd59 100644 (file)
@@ -171,11 +171,11 @@ class rsyslog extends plugin
             }
 
             if($link){
-                $query = "SELECT * FROM SystemEvents WHERE Message like '%GOsa%' ORDER BY ID LIMIT 50";
+                $query = "SELECT * FROM SystemEvents WHERE Message like '%GOsa%' ORDER BY ID DESC LIMIT 50";
                 $res = mysql_query($query, $link);
                 if($res){
                     while($attrs = mysql_fetch_assoc($res)){
-                      $result[] = $attrs; 
+                        $result[] = $attrs; 
                     }
                 }
             }
@@ -194,7 +194,8 @@ class rsyslog extends plugin
             ' </channel>';
 
         foreach($result as $entry){
-            $message = $entry['FromHost'].": ".$entry['Message'];
+
+            $message = $entry['ReceivedAt']." - ".htmlentities($entry['FromHost'].": ".$entry['Message']);
             $source .= "
                 <item>
                 <title>{$message}</title>