From 5639b47844cccc8a53258d29d1c51dbde9bfbdfe Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 7 Aug 2008 11:55:45 +0000 Subject: You can now filter by ID. git-svn-id: https://code.elgg.org/elgg/trunk@1751 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/system_log.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'engine/lib/system_log.php') diff --git a/engine/lib/system_log.php b/engine/lib/system_log.php index d2edf5e1f..4452e4dc8 100644 --- a/engine/lib/system_log.php +++ b/engine/lib/system_log.php @@ -61,7 +61,7 @@ * @param int $offset Offset of where to start. * @param bool $count Return count or not */ - function get_system_log($by_user = "", $event = "", $class = "", $limit = 10, $offset = 0, $count = false, $timebefore = 0, $timeafter = 0) + function get_system_log($by_user = "", $event = "", $class = "", $limit = 10, $offset = 0, $count = false, $timebefore = 0, $timeafter = 0, $object_id = 0) { global $CONFIG; @@ -94,9 +94,11 @@ $where[] = "object_class='$class'"; if ($timebefore) - $where [] = "time_created < " . ((int) $timebefore); + $where[] = "time_created < " . ((int) $timebefore); if ($timeafter) - $where [] = "time_created > " . ((int) $timeafter); + $where[] = "time_created > " . ((int) $timeafter); + if ($object_id) + $where[] = "object_id = " . ((int) $object_id); $select = "*"; if ($count) $select = "count(*) as count"; -- cgit v1.2.3