]> git.mxchange.org Git - friendica.git/blobdiff - include/items.php
add uid variable to b8 classes
[friendica.git] / include / items.php
index 21ee994dc8a39a489d38fbf3425006f0bc64e3b6..ba95919a6ba9672a846b2bfa3fdf2c7d4c18caec 100755 (executable)
@@ -814,6 +814,11 @@ function item_store($arr,$force_parent = false) {
 
        call_hooks('post_remote',$arr);
 
+       if(x($arr,'cancel')) {
+               logger('item_store: post cancelled by plugin.');
+               return 0;
+       }
+
        dbesc_array($arr);
 
        logger('item_store: ' . print_r($arr,true), LOGGER_DATA);
@@ -2755,6 +2760,9 @@ function item_expire($uid,$days) {
 function drop_items($items) {
        $uid = 0;
 
+       if((! local_user()) && (! $remote_user()))
+               return;
+
        if(count($items)) {
                foreach($items as $item) {
                        $owner = drop_item($item,false);