summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0f25a19)
raw | patch | inline | side by side (parent: 0f25a19)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 23 Mar 2010 14:15:01 +0000 (14:15 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 23 Mar 2010 14:15:01 +0000 (14:15 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@17031 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/rsyslog/addons/rsyslog/class_rsyslog.inc | patch | blob | history |
diff --git a/gosa-plugins/rsyslog/addons/rsyslog/class_rsyslog.inc b/gosa-plugins/rsyslog/addons/rsyslog/class_rsyslog.inc
index 6d469d22292539c4547976eaf9839d218318f386..c965149ccc125f0dd9d0c25285e68f963af4ae01 100644 (file)
$prio = "%%";
if($this->selected_priority != "all") $prio = $this->selected_priority;
- $filter = "FROM SystemEvents WHERE FromHost like '{$host}' ";
- $filter.= "AND Priority like '{$prio}' ";
+ $filter = "FROM SystemEvents WHERE 1=1 ";
+ if($host != "%%"){
+ $filter.= " AND FromHost like '{$host}' ";
+ }
+ if($prio != "%%"){
+ $filter.= "AND Priority like '{$prio}' ";
+ }
$filter.= "AND DeviceReportedTime >= '".(date("Y.m.d 00:00:00", strtotime($this->startTime)))."' ";
$filter.= "AND DeviceReportedTime <= '".(date("Y.m.d 23:59:59", strtotime($this->stopTime)))."' ";
$attrs['Facility']= $this->facility2string($attrs['Facility']);
$attrs['Priority']= $this->severity2string($attrs['Priority']);
$attrs['SysLogTag']= preg_replace("/:$/", "", $attrs['SysLogTag']);
+
+ foreach($attrs as $key => $val){
+ $attrs[$key] = htmlentities($val, ENT_COMPAT, 'UTF-8');
+ }
+
$result['entries'][] = $attrs;
}
$this->servers[$name]['status'] = "ok";