mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-11 01:24:27 +02:00
New function to delete items for users
This commit is contained in:
parent
deb015be12
commit
8329705eba
11 changed files with 53 additions and 55 deletions
|
@ -555,14 +555,9 @@ function admin_page_deleteitem_post(App $a)
|
|||
if (strpos($guid, '/')) {
|
||||
$guid = substr($guid, strrpos($guid, '/') + 1);
|
||||
}
|
||||
// Now that we have the GUID get all IDs of the associated entries in the
|
||||
// item table of the DB and drop those items, which will also delete the
|
||||
// Now that we have the GUID, drop those items, which will also delete the
|
||||
// associated threads.
|
||||
$r = dba::select('item', ['id'], ['guid' => $guid]);
|
||||
while ($row = dba::fetch($r)) {
|
||||
Item::deleteById($row['id']);
|
||||
}
|
||||
dba::close($r);
|
||||
Item::delete(['guid' => $guid]);
|
||||
}
|
||||
|
||||
info(L10n::t('Item marked for deletion.') . EOL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue