mirror of
https://github.com/friendica/friendica
synced 2024-11-20 09:03:40 +00:00
Some more cleaner delete
This commit is contained in:
parent
11e524a555
commit
58b2b1dbef
1 changed files with 1 additions and 21 deletions
|
@ -1377,10 +1377,7 @@ function tag_deliver($uid, $item_id) {
|
|||
// mmh.. no mention.. community page or private group... no wall.. no origin.. top-post (not a comment)
|
||||
// delete it!
|
||||
logger("tag_deliver: no-mention top-level post to communuty or private group. delete.");
|
||||
q("DELETE FROM item WHERE id = %d and uid = %d",
|
||||
intval($item_id),
|
||||
intval($uid)
|
||||
);
|
||||
dba::delete('item', array('id' => $item_id));
|
||||
return true;
|
||||
}
|
||||
return;
|
||||
|
@ -2236,23 +2233,6 @@ function drop_item($id, $interactive = true) {
|
|||
// ignore the result
|
||||
}
|
||||
|
||||
|
||||
// clean up item_id and sign meta-data tables
|
||||
|
||||
/*
|
||||
/// @TODO Old code - caused very long queries and warning entries in the mysql logfiles:
|
||||
|
||||
$r = q("DELETE FROM item_id where iid in (select id from item where parent = %d and uid = %d)",
|
||||
intval($item['id']),
|
||||
intval($item['uid'])
|
||||
);
|
||||
|
||||
$r = q("DELETE FROM sign where iid in (select id from item where parent = %d and uid = %d)",
|
||||
intval($item['id']),
|
||||
intval($item['uid'])
|
||||
);
|
||||
*/
|
||||
|
||||
// The new code splits the queries since the mysql optimizer really has bad problems with subqueries
|
||||
|
||||
// Creating list of parents
|
||||
|
|
Loading…
Reference in a new issue