From 824dedbe9d349c5b6d92d1d950267299bc134cc3 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 20 Jul 2016 23:04:07 -0700 Subject: issue #453 and a bug noted from the logfiles related to the schema change last month --- Zotlabs/Module/Item.php | 4 +++- include/import.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php index 235c5528e..b54099d74 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -183,7 +183,9 @@ class Item extends \Zotlabs\Web\Controller { } // can_comment_on_post() needs info from the following xchan_query - xchan_query($r); + // This may be from the discover tab which means we need to correct the effective uid + + xchan_query($r,true,(($r[0]['uid'] == local_channel()) ? 0 : local_channel())); $parent_item = $r[0]; $parent = $r[0]['id']; diff --git a/include/import.php b/include/import.php index 00ecef07d..889b50eb1 100644 --- a/include/import.php +++ b/include/import.php @@ -1004,7 +1004,7 @@ function sync_files($channel,$files) { $attach_id = $x[0]['id']; } - $newfname = 'store/' . $channel['channel_address'] . '/' . get_attach_binname($att['data']); + $newfname = 'store/' . $channel['channel_address'] . '/' . get_attach_binname($att['content']); unset($att['id']); $att['aid'] = $channel['channel_account_id']; -- cgit v1.2.3