]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/Diaspora.php
New function to delete items for users
[friendica.git] / src / Protocol / Diaspora.php
index d2a7995d867c4e510caf3eaf68752625dc3d7caa..f3aa672a215561435ec3c5ca10b8b49e5d6d37cd 100644 (file)
@@ -2785,7 +2785,7 @@ class Diaspora
 
                while ($item = dba::fetch($r)) {
                        // Fetch the parent item
-                       $parent = dba::selectFirst('item', ['author-link', 'origin'], ['id' => $item["parent"]]);
+                       $parent = dba::selectFirst('item', ['author-link'], ['id' => $item["parent"]]);
 
                        // Only delete it if the parent author really fits
                        if (!link_compare($parent["author-link"], $contact["url"]) && !link_compare($item["author-link"], $contact["url"])) {
@@ -2793,7 +2793,7 @@ class Diaspora
                                continue;
                        }
 
-                       Item::deleteById($item["id"]);
+                       Item::delete(['id' => $item["id"]]);
 
                        logger("Deleted target ".$target_guid." (".$item["id"].") from user ".$item["uid"]." parent: ".$item["parent"], LOGGER_DEBUG);
                }