aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-05-21 21:51:02 -0700
committerfriendica <info@friendica.com>2013-05-21 21:51:02 -0700
commit1c908c0891e39d24eb39c8304e3f52fe2229bb45 (patch)
tree26ba3405fb56e1962a825c4007b3d746878304a6
parentc64c79eb119726e359bb4b47d1e30340d96f983d (diff)
downloadvolse-hubzilla-1c908c0891e39d24eb39c8304e3f52fe2229bb45.tar.gz
volse-hubzilla-1c908c0891e39d24eb39c8304e3f52fe2229bb45.tar.bz2
volse-hubzilla-1c908c0891e39d24eb39c8304e3f52fe2229bb45.zip
improvements to post_activity_item() so that it does not behave differently with delivery plugins than post_local via the API.
-rwxr-xr-xinclude/items.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php
index dbd493724..84eae3593 100755
--- a/include/items.php
+++ b/include/items.php
@@ -128,6 +128,19 @@ function post_activity_item($arr) {
$arr['deny_cid'] = ((x($arr,'deny_cid')) ? $arr['deny_cid'] : $channel['channel_deny_cid']);
$arr['deny_gid'] = ((x($arr,'deny_gid')) ? $arr['deny_gid'] : $channel['channel_deny_gid']);
+
+ // for the benefit of plugins, we will behave as if this is an API call rather than a normal online post
+
+ $_REQUEST['api_source'] = 1;
+
+ call_hooks('post_local'$arr);
+
+ if(x($arr,'cancel')) {
+ logger('post_activity_item: post cancelled by plugin.');
+ return $ret;
+ }
+
+
$post_id = item_store($arr);
if($post_id) {