]> git.mxchange.org Git - friendica.git/commitdiff
Added the new parameter to the delete function.
authorMichael <heluecht@pirati.ca>
Sat, 26 May 2018 21:38:45 +0000 (21:38 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 26 May 2018 21:38:45 +0000 (21:38 +0000)
include/api.php
include/items.php
mod/events.php
mod/item.php
mod/photos.php
mod/videos.php

index e25d12c40aa7dfea0dedaa61476cd85aa951a67c..383225778496ae971b5041e38e48873814468ecd 100644 (file)
@@ -2256,7 +2256,7 @@ function api_statuses_destroy($type)
 
        $ret = api_statuses_show($type);
 
-       Item::deleteById($id);
+       Item::deleteById($id, PRIORITY_HIGH, api_user());
 
        return $ret;
 }
@@ -4148,7 +4148,7 @@ function api_fr_photoalbum_delete($type)
                if (!DBM::is_result($photo_item)) {
                        throw new InternalServerErrorException("problem with deleting items occured");
                }
-               Item::deleteById($photo_item[0]['id']);
+               Item::deleteById($photo_item[0]['id'], PRIORITY_HIGH, api_user());
        }
 
        // now let's delete all photos from the album
@@ -4441,7 +4441,7 @@ function api_fr_photo_delete($type)
                }
                // function for setting the items to "deleted = 1" which ensures that comments, likes etc. are not shown anymore
                // to the user and the contacts of the users (drop_items() do all the necessary magic to avoid orphans in database and federate deletion)
-               Item::deleteById($photo_item[0]['id']);
+               Item::deleteById($photo_item[0]['id'], PRIORITY_HIGH, api_user());
 
                $answer = ['result' => 'deleted', 'message' => 'photo with id `' . $photo_id . '` has been deleted from server.'];
                return api_format_data("photo_delete", $type, ['$result' => $answer]);
index c04bef01c3de0ecb72a8e0c98d52d303f60313e1..b84ac701a614ba03a2a132fa648caa989ed76fd7 100644 (file)
@@ -321,7 +321,7 @@ function drop_items($items) {
 
        if (count($items)) {
                foreach ($items as $item) {
-                       $owner = Item::deleteById($item);
+                       $owner = Item::deleteById($item, PRIORITY_HIGH, local_user());
                        if ($owner && !$uid)
                                $uid = $owner;
                }
@@ -393,7 +393,7 @@ function drop_item($id) {
                }
 
                // delete the item
-               Item::deleteById($item['id']);
+               Item::deleteById($item['id'], PRIORITY_HIGH, local_user());
 
                goaway(System::baseUrl() . '/' . $_SESSION['return_url']);
                //NOTREACHED
index cad440f164c542feb6915868b0d49d18e997f277..e40e69f5009ae7345418be79a19cc2a71c236011 100644 (file)
@@ -545,7 +545,7 @@ function events_content(App $a) {
 
                // Delete only real events (no birthdays)
                if (DBM::is_result($ev) && $ev[0]['type'] == 'event') {
-                       $del = Item::deleteById($ev[0]['itemid']);
+                       $del = Item::deleteById($ev[0]['itemid'], PRIORITY_HIGH, local_user());
                }
 
                if ($del == 0) {
index a3ed63cd978276b832ac0bc5f9947efe65d7888b..ca79a640287e938bbe3fa9ae73a6e6d5df718669 100644 (file)
@@ -877,7 +877,7 @@ function item_content(App $a) {
        $o = '';
        if (($a->argc == 3) && ($a->argv[1] === 'drop') && intval($a->argv[2])) {
                if (is_ajax()) {
-                       $o = Item::deleteById($a->argv[2]);
+                       $o = Item::deleteById($a->argv[2], PRIORITY_HIGH, local_user());
                } else {
                        $o = drop_item($a->argv[2]);
                }
index c8dad750d1528b95f9231b7eb0d69706b76c9ffa..3d38be5037cf26332e61ff887ce8e694ecd5a558 100644 (file)
@@ -289,7 +289,7 @@ function photos_post(App $a)
                        );
                        if (DBM::is_result($r)) {
                                foreach ($r as $rr) {
-                                       Item::deleteById($rr['id']);
+                                       Item::deleteById($rr['id'], PRIORITY_HIGH, $page_owner_uid);
                                }
                        }
 
@@ -349,7 +349,7 @@ function photos_post(App $a)
                                intval($page_owner_uid)
                        );
                        if (DBM::is_result($i)) {
-                               Item::deleteById($i[0]['id']);
+                               Item::deleteById($i[0]['id'], PRIORITY_HIGH, $page_owner_uid);
 
                                // Update the photo albums cache
                                Photo::clearAlbumCache($page_owner_uid);
index f4b8c46b1bd80d1e6dd06386b53f5ea26fcbed08..6dee4586aa6f584428a036a0a198d5dd710fb8d1 100644 (file)
@@ -169,7 +169,7 @@ function videos_post(App $a) {
                        );
 
                        if (DBM::is_result($i)) {
-                               Item::deleteById($i[0]['id']);
+                               Item::deleteById($i[0]['id'], PRIORITY_HIGH, local_user());
                        }
                }