From 0ee5aeddcb8fd223418c8d0a5afc3df8287201a8 Mon Sep 17 00:00:00 2001 From: icewing Date: Fri, 6 Jun 2008 10:53:42 +0000 Subject: Marcus Povey * Limit to specific users and/or relationships git-svn-id: https://code.elgg.org/elgg/trunk@818 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/system_log.php | 13 ++++++++++--- 1 file changed, 10 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 fbb9f9d96..a9d0bfb38 100644 --- a/engine/lib/system_log.php +++ b/engine/lib/system_log.php @@ -44,29 +44,36 @@ * This is useful for checking access permissions etc on objects. */ public function getObjectFromID($id); + + /** + * Return the GUID of the owner of this object. + */ + public function getObjectOwnerGUID(); } /** * Retrieve the system log based on a number of parameters. * + * @param int $by_user The user who initiated the event. * @param string $event The event you are searching on. * @param string $class The class of object it effects. * @param int $limit Maximum number of responses to return. * @param int $offset Offset of where to start. */ - function get_system_log($event = "", $class = "", $limit = 10, $offset = 0) + function get_system_log($by_user = "", $event = "", $class = "", $limit = 10, $offset = 0) { global $CONFIG; + $by_user = (int)$by_user; $event = sanitise_string($event); $class = sanitise_string($class); $limit = (int)$limit; $offset = (int)$offset; - $access = get_access_list(); - $where = array(); + if ($by_user != "") + $where[] = "performed_by_guid=$by_user"; if ($event != "") $where[] = "event='$event'"; if ($class!=="") -- cgit v1.2.3