aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-04-22 18:15:02 +0000
committerMario <mario@mariovavti.com>2020-04-22 18:15:02 +0000
commit88eb19165b2cb9655e47d9ca8d5324a6e00dcf36 (patch)
treefc6aa01915cf4c8c1077d2371660847fda226b1a
parentb1b9dbe55f4cc0740b113514085da52f290853ee (diff)
downloadvolse-hubzilla-88eb19165b2cb9655e47d9ca8d5324a6e00dcf36.tar.gz
volse-hubzilla-88eb19165b2cb9655e47d9ca8d5324a6e00dcf36.tar.bz2
volse-hubzilla-88eb19165b2cb9655e47d9ca8d5324a6e00dcf36.zip
the parent id is required later in the process
-rw-r--r--Zotlabs/Module/Display.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/Zotlabs/Module/Display.php b/Zotlabs/Module/Display.php
index 777d183e1..f45f37001 100644
--- a/Zotlabs/Module/Display.php
+++ b/Zotlabs/Module/Display.php
@@ -101,7 +101,7 @@ class Display extends \Zotlabs\Web\Controller {
if($decoded)
$item_hash = $decoded;
- $r = q("select id, uid, mid, parent_mid, thr_parent, verb, item_type, item_deleted, author_xchan, item_blocked from item where mid like '%s' limit 1",
+ $r = q("select id, uid, mid, parent, parent_mid, thr_parent, verb, item_type, item_deleted, author_xchan, item_blocked from item where mid like '%s' limit 1",
dbesc($item_hash . '%')
);
@@ -159,14 +159,17 @@ class Display extends \Zotlabs\Web\Controller {
}
}
if($target_item['item_type'] == ITEM_TYPE_CARD) {
+
$x = q("select * from channel where channel_id = %d limit 1",
intval($target_item['uid'])
);
+
$y = q("select * from iconfig left join item on iconfig.iid = item.id
where item.uid = %d and iconfig.cat = 'system' and iconfig.k = 'CARD' and item.id = %d limit 1",
intval($target_item['uid']),
intval($target_item['parent'])
);
+
if($x && $y) {
goaway(z_root() . '/cards/' . $x[0]['channel_address'] . '/' . $y[0]['v']);
}