]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Api/Friendica/Photoalbum/Delete.php
Merge pull request #11037 from MrPetovan/bug/11023-api-photo-delete
[friendica.git] / src / Module / Api / Friendica / Photoalbum / Delete.php
index c7592a5eaf0c8eec8ec3de8c3824031171ed1bc7..8a45de2d3632fb78497f9ea9e87bd51230cc3e20 100644 (file)
@@ -41,7 +41,7 @@ class Delete extends BaseApi
 
                $request = self::getRequest([
                        'album' => '', // Album name
-               ]);
+               ], $request);
 
                // we do not allow calls without album string
                if (empty($request['album'])) {
@@ -58,7 +58,7 @@ class Delete extends BaseApi
 
                // 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() performs the federation of the deletion to other networks
-               $condition = ['uid' => $uid, 'resource-id' => $resourceIds, 'type' => 'photo'];
+               $condition = ['uid' => $uid, 'resource-id' => $resourceIds, 'post-type' => Item::PT_IMAGE, 'origin' => true];
                Item::deleteForUser($condition, $uid);
 
                // now let's delete all photos from the album