" view = '{$view}', " .
" subject_guid = {$subject_guid}, " .
" object_guid = {$object_guid}, " .
- " posted = {$posted}, " .
- " annotation_id = {$annotation_id} ");
+ " annotation_id = {$annotation_id}, " .
+ " posted = {$posted} ");
}
/**
*
* @param int|array $subject_guid Acting entity to restrict to. Default: all
* @param int|array $object_guid Entity being acted on to restrict to. Default: all
- * @param string $subject_relationship If set to a relationship type, this will use $subject_guid as the starting point and set the subjects to be all users this entity has this relationship with (eg 'friend'). Default: blank
+ * @param string $subject_relationship If set to a relationship type, this will use
+ * $subject_guid as the starting point and set the subjects to be all users this
+ * entity has this relationship with (eg 'friend'). Default: blank
* @param string $type The type of entity to restrict to. Default: all
* @param string $subtype The subtype of entity to restrict to. Default: all
* @param string $action_type The type of river action to restrict to. Default: all
$whereclause = implode(' and ', $where);
// Construct main SQL
- $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}";
+ $sql = "select id,type,subtype,action_type,access_id,view,subject_guid,object_guid,annotation_id,posted" .
+ " from {$CONFIG->dbprefix}river where {$whereclause} order by posted desc limit {$offset},{$limit}";
// Get data
return get_data($sql);
*
* @param int|array $subject_guid Acting entity to restrict to. Default: all
* @param int|array $object_guid Entity being acted on to restrict to. Default: all
- * @param string $subject_relationship If set to a relationship type, this will use $subject_guid as the starting point and set the subjects to be all users this entity has this relationship with (eg 'friend'). Default: blank
+ * @param string $subject_relationship If set to a relationship type, this will use
+ * $subject_guid as the starting point and set the subjects to be all users this
+ * entity has this relationship with (eg 'friend'). Default: blank
* @param string $type The type of entity to restrict to. Default: all
* @param string $subtype The subtype of entity to restrict to. Default: all
* @param string $action_type The type of river action to restrict to. Default: all
// Get river items, if they exist
if ($riveritems = get_river_items($subject_guid,$object_guid,$subject_relationship,$type,$subtype,$action_type,($limit + 1),$offset,$posted_min,$posted_max)) {
- return elgg_view('river/item/list',array(
- 'limit' => $limit,
- 'offset' => $offset,
- 'items' => $riveritems,
- 'pagination' => $pagination
- ));
+ return elgg_view('river/item/list',array(
+ 'limit' => $limit,
+ 'offset' => $offset,
+ 'items' => $riveritems,
+ 'pagination' => $pagination
+ ));
}
`view` TEXT NOT NULL ,\r
`subject_guid` INT NOT NULL ,\r
`object_guid` INT NOT NULL ,\r
+ `annotation_id` int(11) NOT NULL,\r
`posted` INT NOT NULL ,\r
PRIMARY KEY ( `id` ) ,\r
KEY `type` (`type`),\r
KEY `access_id` (`access_id`),\r
KEY `subject_guid` (`subject_guid`),\r
KEY `object_guid` (`object_guid`),\r
+ KEY `annotation_id` (`annotation_id`),\r
KEY `posted` (`posted`)\r
) ENGINE = MYISAM DEFAULT CHARSET=utf8;