aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/system_log.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/system_log.php')
-rw-r--r--engine/lib/system_log.php19
1 files changed, 14 insertions, 5 deletions
diff --git a/engine/lib/system_log.php b/engine/lib/system_log.php
index 52ec6bee0..fbf0b073a 100644
--- a/engine/lib/system_log.php
+++ b/engine/lib/system_log.php
@@ -63,8 +63,14 @@
function get_system_log($by_user = "", $event = "", $class = "", $limit = 10, $offset = 0)
{
global $CONFIG;
-
- $by_user = (int)$by_user;
+
+ if (is_array($by_user) && sizeof($by_user) > 0) {
+ foreach($by_user as $key => $val) {
+ $by_user[$key] = (int) $val;
+ }
+ } else {
+ $by_user = (int)$by_user;
+ }
$event = sanitise_string($event);
$class = sanitise_string($class);
$limit = (int)$limit;
@@ -72,8 +78,11 @@
$where = array();
- if ($by_user != "")
- $where[] = "performed_by_guid=$by_user";
+ if (is_int($by_user) && $by_user > 0) {
+ $where[] = "performed_by_guid=$by_user";
+ } else if (is_array($by_user)) {
+ $where [] = "performed_by_guid in (". implode(",",$by_user) .")";
+ }
if ($event != "")
$where[] = "event='$event'";
if ($class!=="")
@@ -84,7 +93,7 @@
$query .= " and $w";
$query .= " order by time_created desc";
- $query .= " limit $offset, $limit"; // Add order and limit
+ $query .= " limit $offset, $limit"; // Add order and limit
return get_data($query);
}