aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-01-24 16:44:10 -0800
committerfriendica <info@friendica.com>2013-01-24 16:44:10 -0800
commitcb5a20ba2cbad131267542ff55b394a9763b4c2c (patch)
tree4e4fd9e766b9c0acd04b9a81d7d4b244d66ad4b8 /include/zot.php
parent4f7f547190f5ec2557739aad6b2c09e3f45cdc76 (diff)
downloadvolse-hubzilla-cb5a20ba2cbad131267542ff55b394a9763b4c2c.tar.gz
volse-hubzilla-cb5a20ba2cbad131267542ff55b394a9763b4c2c.tar.bz2
volse-hubzilla-cb5a20ba2cbad131267542ff55b394a9763b4c2c.zip
uncomplicate item deletion and fixup all the other linked tables
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php15
1 files changed, 2 insertions, 13 deletions
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) {