diff options
author | zotlabs <mike@macgirvin.com> | 2017-11-23 14:00:24 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-11-23 14:00:24 -0800 |
commit | e5141dd91bf483b0458b6f9226b994afbee23524 (patch) | |
tree | 958afce923e2b7b13278c19d8c707daf73bf2a73 /Zotlabs/Module/Item.php | |
parent | 9936670f44b53e391d997fd024faa329b8a0c803 (diff) | |
parent | 14f12927436f71c753127be83f348d89b99401b6 (diff) | |
download | volse-hubzilla-e5141dd91bf483b0458b6f9226b994afbee23524.tar.gz volse-hubzilla-e5141dd91bf483b0458b6f9226b994afbee23524.tar.bz2 volse-hubzilla-e5141dd91bf483b0458b6f9226b994afbee23524.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'Zotlabs/Module/Item.php')
-rw-r--r-- | Zotlabs/Module/Item.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php index f2b850ffc..ecbefa1c2 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -629,6 +629,9 @@ class Item extends \Zotlabs\Web\Controller { if($webpage == ITEM_TYPE_CARD) { $catlink = z_root() . '/cards/' . $channel['channel_address'] . '?f=&cat=' . urlencode(trim($cat)); } + elseif($webpage == ITEM_TYPE_ARTICLE) { + $catlink = z_root() . '/articles/' . $channel['channel_address'] . '?f=&cat=' . urlencode(trim($cat)); + } else { $catlink = $owner_xchan['xchan_url'] . '?f=&cat=' . urlencode(trim($cat)); } @@ -733,6 +736,18 @@ class Item extends \Zotlabs\Web\Controller { } } + if($webpage == ITEM_TYPE_ARTICLE) { + $plink = z_root() . '/articles/' . $channel['channel_address'] . '/' . (($pagetitle) ? $pagetitle : substr($mid,0,16)); + } + if(($parent_item) && ($parent_item['item_type'] == ITEM_TYPE_ARTICLE)) { + $r = q("select v from iconfig where iconfig.cat = 'system' and iconfig.k = 'ARTICLE' and iconfig.iid = %d limit 1", + intval($parent_item['id']) + ); + if($r) { + $plink = z_root() . '/articles/' . $channel['channel_address'] . '/' . $r[0]['v']; + } + } + if ((! $plink) && ($item_thread_top)) { $plink = z_root() . '/channel/' . $channel['channel_address'] . '/?f=&mid=' . $mid; } |