aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/system_log.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-07 11:55:45 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-07 11:55:45 +0000
commit5639b47844cccc8a53258d29d1c51dbde9bfbdfe (patch)
tree33f7e11e38a1c08059be4e7646a989cde8489861 /engine/lib/system_log.php
parent899ddba2c802ad093565f92fcd621e9608bbe208 (diff)
downloadelgg-5639b47844cccc8a53258d29d1c51dbde9bfbdfe.tar.gz
elgg-5639b47844cccc8a53258d29d1c51dbde9bfbdfe.tar.bz2
You can now filter by ID.
git-svn-id: https://code.elgg.org/elgg/trunk@1751 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/system_log.php')
-rw-r--r--engine/lib/system_log.php8
1 files changed, 5 insertions, 3 deletions
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";