diff options
author | zotlabs <mike@macgirvin.com> | 2018-04-05 16:58:37 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-04-05 16:58:37 -0700 |
commit | b7386a0e88ca292bf183cd1de9b09bd6e819172d (patch) | |
tree | be956a08bea057f341ef867e7af57e5ecca44c47 /Zotlabs | |
parent | fe401203bd33fdb19880420556c8a6b6a371f94e (diff) | |
download | volse-hubzilla-b7386a0e88ca292bf183cd1de9b09bd6e819172d.tar.gz volse-hubzilla-b7386a0e88ca292bf183cd1de9b09bd6e819172d.tar.bz2 volse-hubzilla-b7386a0e88ca292bf183cd1de9b09bd6e819172d.zip |
fix permalinks to children of articles and cards
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Module/Display.php | 6 | ||||
-rw-r--r-- | Zotlabs/Module/Item.php | 1 | ||||
-rw-r--r-- | Zotlabs/Module/Like.php | 1 | ||||
-rw-r--r-- | Zotlabs/Module/React.php | 1 |
4 files changed, 6 insertions, 3 deletions
diff --git a/Zotlabs/Module/Display.php b/Zotlabs/Module/Display.php index 30f2a7f5f..06c9479b2 100644 --- a/Zotlabs/Module/Display.php +++ b/Zotlabs/Module/Display.php @@ -132,7 +132,7 @@ class Display extends \Zotlabs\Web\Controller { $y = q("select * from iconfig left join item on iconfig.iid = item.id where item.uid = %d and iconfig.cat = 'system' and iconfig.k = 'WEBPAGE' and item.id = %d limit 1", intval($target_item['uid']), - intval($target_item['id']) + intval($target_item['parent']) ); if($x && $y) { goaway(z_root() . '/page/' . $x[0]['channel_address'] . '/' . $y[0]['v']); @@ -149,7 +149,7 @@ class Display extends \Zotlabs\Web\Controller { $y = q("select * from iconfig left join item on iconfig.iid = item.id where item.uid = %d and iconfig.cat = 'system' and iconfig.k = 'ARTICLE' and item.id = %d limit 1", intval($target_item['uid']), - intval($target_item['id']) + intval($target_item['parent']) ); if($x && $y) { goaway(z_root() . '/articles/' . $x[0]['channel_address'] . '/' . $y[0]['v']); @@ -166,7 +166,7 @@ class Display extends \Zotlabs\Web\Controller { $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['id']) + intval($target_item['parent']) ); if($x && $y) { goaway(z_root() . '/cards/' . $x[0]['channel_address'] . '/' . $y[0]['v']); diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php index ad72d9ccd..bba1dc02d 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -468,6 +468,7 @@ class Item extends \Zotlabs\Web\Controller { $private = intval($acl->is_private() || $parent_item['item_private']); $public_policy = $parent_item['public_policy']; $owner_hash = $parent_item['owner_xchan']; + $webpage = $parent_item['item_type']; } if((! $allow_empty) && (! strlen($body))) { diff --git a/Zotlabs/Module/Like.php b/Zotlabs/Module/Like.php index 12de86e72..4e216f08b 100644 --- a/Zotlabs/Module/Like.php +++ b/Zotlabs/Module/Like.php @@ -419,6 +419,7 @@ class Like extends \Zotlabs\Web\Controller { $arr['item_origin'] = 1; $arr['item_notshown'] = 1; + $arr['item_type'] = $item['item_type']; if(intval($item['item_wall'])) $arr['item_wall'] = 1; diff --git a/Zotlabs/Module/React.php b/Zotlabs/Module/React.php index 6473317c7..fbb760786 100644 --- a/Zotlabs/Module/React.php +++ b/Zotlabs/Module/React.php @@ -49,6 +49,7 @@ class React extends \Zotlabs\Web\Controller { $n['aid'] = $channel['channel_account_id']; $n['uid'] = $channel['channel_id']; $n['item_origin'] = true; + $n['item_type'] = $i[0]['item_type']; $n['parent'] = $postid; $n['parent_mid'] = $i[0]['mid']; $n['mid'] = item_message_id(); |