From c4e6394930e310c3db1f0c537f05618ccc035610 Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 7 Aug 2008 11:33:34 +0000 Subject: System log functions now allow searching. git-svn-id: https://code.elgg.org/elgg/trunk@1748 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/system_log.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'engine/lib/system_log.php') diff --git a/engine/lib/system_log.php b/engine/lib/system_log.php index 0c382df53..d2edf5e1f 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) + function get_system_log($by_user = "", $event = "", $class = "", $limit = 10, $offset = 0, $count = false, $timebefore = 0, $timeafter = 0) { global $CONFIG; @@ -92,6 +92,11 @@ $where[] = "event='$event'"; if ($class!=="") $where[] = "object_class='$class'"; + + if ($timebefore) + $where [] = "time_created < " . ((int) $timebefore); + if ($timeafter) + $where [] = "time_created > " . ((int) $timeafter); $select = "*"; if ($count) $select = "count(*) as count"; -- cgit v1.2.3