From cb5a20ba2cbad131267542ff55b394a9763b4c2c Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 24 Jan 2013 16:44:10 -0800 Subject: uncomplicate item deletion and fixup all the other linked tables --- include/zot.php | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'include/zot.php') diff --git a/include/zot.php b/include/zot.php index f35c6f93e..5c930aba4 100644 --- a/include/zot.php +++ b/include/zot.php @@ -998,19 +998,8 @@ function delete_imported_item($sender,$item,$uid) { return; } - $r = q("update item set body = '', title = '', item_restrict = %d, edited = '%s', changed = '%s' - where ( thr_parent = '%s' or parent_uri = '%s' ) and uid = %d", - intval(ITEM_DELETED), - dbesc(datetime_convert()), - dbesc(datetime_convert()), - dbesc($item['uri']), - dbesc($item['uri']), - intval($uid) - ); - - if(! $r) - logger("delete_imported_item: db update failed. Item = {$item['uri']} uid = $uid"); - + require_once('include/items.php'); + drop_item($r[0]['id'],false); } function process_mail_delivery($sender,$arr,$deliveries) { -- cgit v1.2.3