aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/river.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/river.php')
-rw-r--r--engine/lib/river.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/engine/lib/river.php b/engine/lib/river.php
index 80f285e50..49b070082 100644
--- a/engine/lib/river.php
+++ b/engine/lib/river.php
@@ -23,7 +23,9 @@
function add_to_river($view, $action_type, $subject_guid, $object_guid, $access_id = "",
$posted = 0, $annotation_id = 0) {
- // use default viewtype for when called from REST api
+ global $CONFIG;
+
+ // use default viewtype for when called from web services api
if (!elgg_view_exists($view, 'default')) {
return false;
}
@@ -60,7 +62,7 @@ $posted = 0, $annotation_id = 0) {
);
// return false to stop insert
- $params = elgg_trigger_plugin_hook('add', 'river', null, $params);
+ $params = elgg_trigger_plugin_hook('creating', 'river', null, $params);
if ($params == false) {
// inserting did not fail - it was just prevented
return true;
@@ -68,9 +70,6 @@ $posted = 0, $annotation_id = 0) {
extract($params);
- // Load config
- global $CONFIG;
-
// Attempt to save river item; return success status
$insert_data = insert_data("insert into {$CONFIG->dbprefix}river " .
" set type = '$type', " .
@@ -83,7 +82,8 @@ $posted = 0, $annotation_id = 0) {
" annotation_id = $annotation_id, " .
" posted = $posted");
- //update the entities which had the action carried out on it
+ // update the entities which had the action carried out on it
+ // @todo shouldn't this be down elsewhere? Like when an annotation is saved?
if ($insert_data) {
update_entity_last_action($object_guid, $posted);
return $insert_data;