aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-01-19 19:11:49 +0000
committerMario <mario@mariovavti.com>2022-01-19 19:11:49 +0000
commitc6b459cf969c9abaa98719fb5202fac9b8ce40c0 (patch)
tree6ba9362ca6cd8c00eb57c8b196b2dd82d58f5f46 /include
parent44da40d18d3420c44870d90eb8990223b11883f2 (diff)
downloadvolse-hubzilla-c6b459cf969c9abaa98719fb5202fac9b8ce40c0.tar.gz
volse-hubzilla-c6b459cf969c9abaa98719fb5202fac9b8ce40c0.tar.bz2
volse-hubzilla-c6b459cf969c9abaa98719fb5202fac9b8ce40c0.zip
drop_item() requires the item id not the item array
Diffstat (limited to 'include')
-rw-r--r--include/connections.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/connections.php b/include/connections.php
index a0a9e04a7..dcfcc3985 100644
--- a/include/connections.php
+++ b/include/connections.php
@@ -286,17 +286,18 @@ function remove_all_xchan_resources($xchan, $channel_id = 0) {
$dirmode = intval(get_config('system','directory_mode'));
-
$r = q("delete from photo where xchan = '%s'",
dbesc($xchan)
);
+
$r = q("select resource_id, resource_type, uid, id from item where ( author_xchan = '%s' or owner_xchan = '%s' ) ",
dbesc($xchan),
dbesc($xchan)
);
+
if($r) {
foreach($r as $rr) {
- drop_item($rr,false);
+ drop_item($rr['id'],false);
}
}