aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Item.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-11-22 15:39:06 -0800
committerzotlabs <mike@macgirvin.com>2017-11-22 15:39:06 -0800
commit6c178d44858bbdfd582d09eb4568d32292c0b2c2 (patch)
treeef71ebbdd8629b8c66a52f8b14d0e9db16670499 /Zotlabs/Module/Item.php
parent8bd8af7d16d6b4fb40680bd33b99bbfd582a1208 (diff)
downloadvolse-hubzilla-6c178d44858bbdfd582d09eb4568d32292c0b2c2.tar.gz
volse-hubzilla-6c178d44858bbdfd582d09eb4568d32292c0b2c2.tar.bz2
volse-hubzilla-6c178d44858bbdfd582d09eb4568d32292c0b2c2.zip
article feature
Diffstat (limited to 'Zotlabs/Module/Item.php')
-rw-r--r--Zotlabs/Module/Item.php15
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;
}