X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2FModule%2FApi%2FFriendica%2FPhotoalbum%2FDelete.php;h=76062b2fdedfe6e7df15fda0e2b607f003b1e7a7;hb=951b221e214a0b3472a3d5f53d9597b01057c036;hp=8c277d39eb5391ca14478a3a25e18ec23489b152;hpb=222b35684d4da5345f153f975cb15afe8579aa55;p=friendica.git diff --git a/src/Module/Api/Friendica/Photoalbum/Delete.php b/src/Module/Api/Friendica/Photoalbum/Delete.php index 8c277d39eb..76062b2fde 100644 --- a/src/Module/Api/Friendica/Photoalbum/Delete.php +++ b/src/Module/Api/Friendica/Photoalbum/Delete.php @@ -1,6 +1,6 @@ getRequest([ 'album' => '', // Album name ], $request); @@ -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 @@ -66,6 +66,7 @@ class Delete extends BaseApi // return success of deletion or error message if ($result) { + Photo::clearAlbumCache($uid); $answer = ['result' => 'deleted', 'message' => 'album `' . $request['album'] . '` with all containing photos has been deleted.']; $this->response->exit('photoalbum_delete', ['$result' => $answer], $this->parameters['extension'] ?? null); } else {