aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-03-27 20:28:48 -0700
committerfriendica <info@friendica.com>2014-03-27 20:28:48 -0700
commita6d8668a5f31def1a74fcdfe15a184acfe3d696d (patch)
treed58f65fb2cf1bfc8347478757f9c3dedeb5c6cab /mod
parent8c3efd20f4a56517d714bc533549251f41308d7e (diff)
downloadvolse-hubzilla-a6d8668a5f31def1a74fcdfe15a184acfe3d696d.tar.gz
volse-hubzilla-a6d8668a5f31def1a74fcdfe15a184acfe3d696d.tar.bz2
volse-hubzilla-a6d8668a5f31def1a74fcdfe15a184acfe3d696d.zip
try and sort out the item delete mess
Diffstat (limited to 'mod')
-rw-r--r--mod/item.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/mod/item.php b/mod/item.php
index 5a3691d5e..2fa978b44 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -890,9 +890,19 @@ function item_content(&$a) {
require_once('include/security.php');
- if(($a->argc == 3) && ($a->argv[1] === 'drop') && intval($a->argv[2])) {
+ if((argc() == 3) && (argv(1) === 'drop') && intval(argv(2))) {
require_once('include/items.php');
- drop_item($a->argv[2]);
+ $i = q("select id, item_restrict from item where id = %d and uid = %d limit 1",
+ intval(argv(2))
+ );
+ if($i) {
+ if($i[0]['item_restrict'])
+ drop_item($i[0]['id']);
+ else {
+ drop_item($i[0]['id'],true,DROPITEM_PHASE1);
+ tag_deliver($uid,$i[0]['id']);
+ }
+ }
}
}