aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-07 11:33:34 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-07 11:33:34 +0000
commitc4e6394930e310c3db1f0c537f05618ccc035610 (patch)
treeace75867c23f2c6157471ff47dbc02930079a10b /engine
parent5028eba1c6087d32ff5db192f12581cfe60a5b87 (diff)
downloadelgg-c4e6394930e310c3db1f0c537f05618ccc035610.tar.gz
elgg-c4e6394930e310c3db1f0c537f05618ccc035610.tar.bz2
System log functions now allow searching.
git-svn-id: https://code.elgg.org/elgg/trunk@1748 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/system_log.php7
1 files changed, 6 insertions, 1 deletions
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";