diff options
author | dave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-09-21 14:50:23 +0000 |
---|---|---|
committer | dave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-09-21 14:50:23 +0000 |
commit | f1ba6ec14130a5480653745b22de6a001112bddb (patch) | |
tree | 2ec0fba80900655965b1c6d88bf4aaa7c22e39a6 /engine/lib/river2.php | |
parent | 59f01de10c6a581c074889b96fbe4698ccd47309 (diff) | |
download | elgg-f1ba6ec14130a5480653745b22de6a001112bddb.tar.gz elgg-f1ba6ec14130a5480653745b22de6a001112bddb.tar.bz2 |
New river code added to allow user comment to be pulled out and displayed
git-svn-id: http://code.elgg.org/elgg/trunk@3490 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/river2.php')
-rw-r--r-- | engine/lib/river2.php | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/engine/lib/river2.php b/engine/lib/river2.php index 1a982e6a4..510ec7b8c 100644 --- a/engine/lib/river2.php +++ b/engine/lib/river2.php @@ -23,14 +23,8 @@ * @param int $posted The UNIX epoch timestamp of the river item (default: now) * @return true|false Depending on success */ - function add_to_river( - $view, - $action_type, - $subject_guid, - $object_guid, - $access_id = "", - $posted = 0 - ) { + function add_to_river($view,$action_type,$subject_guid,$object_guid,$access_id = "",$posted = 0, $annotation_id = 0) + { // Sanitise variables if (!elgg_view_exists($view)) return false; @@ -39,10 +33,9 @@ if (empty($action_type)) return false; if ($posted == 0) $posted = time(); if ($access_id === "") $access_id = $object->access_id; - + $annotation_id = (int)$annotation_id; $type = $object->getType(); $subtype = $object->getSubtype(); - $action_type = sanitise_string($action_type); // Load config @@ -57,7 +50,8 @@ " view = '{$view}', " . " subject_guid = {$subject_guid}, " . " object_guid = {$object_guid}, " . - " posted = {$posted} "); + " posted = {$posted}, " . + " annotation_id = {$annotation_id} "); } @@ -217,7 +211,7 @@ $whereclause = implode(' and ', $where); // Construct main SQL - $sql = "select id,type,subtype,action_type,access_id,view,subject_guid,object_guid,posted from {$CONFIG->dbprefix}river where {$whereclause} order by posted desc limit {$offset},{$limit}"; + $sql = "select id,type,subtype,action_type,access_id,view,subject_guid,object_guid,posted,annotation_id from {$CONFIG->dbprefix}river where {$whereclause} order by posted desc limit {$offset},{$limit}"; // Get data return get_data($sql); |