aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Item.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-08-24 16:58:39 -0700
committerzotlabs <mike@macgirvin.com>2017-08-24 16:58:39 -0700
commitbd84a3ee08ecbf028af5b3ea672062abc93ab3e1 (patch)
treee27632c90e6585224f1595550647e51f1c12e709 /Zotlabs/Module/Item.php
parent85f24c292f071b9a83aea0aa122231afd57e7f73 (diff)
downloadvolse-hubzilla-bd84a3ee08ecbf028af5b3ea672062abc93ab3e1.tar.gz
volse-hubzilla-bd84a3ee08ecbf028af5b3ea672062abc93ab3e1.tar.bz2
volse-hubzilla-bd84a3ee08ecbf028af5b3ea672062abc93ab3e1.zip
fix permalinks for card comments (send to parent url)
Diffstat (limited to 'Zotlabs/Module/Item.php')
-rw-r--r--Zotlabs/Module/Item.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php
index 797b46f93..4131bab03 100644
--- a/Zotlabs/Module/Item.php
+++ b/Zotlabs/Module/Item.php
@@ -734,10 +734,21 @@ class Item extends \Zotlabs\Web\Controller {
if($parent_item)
$parent_mid = $parent_item['mid'];
+
+
+ // fix permalinks for cards
if($webpage == ITEM_TYPE_CARD && $pagetitle) {
$plink = z_root() . '/cards/' . $channel['channel_address'] . '/' . $pagetitle;
}
+ if(($parent_item) && ($parent_item['item_type'] == ITEM_TYPE_CARD)) {
+ $r = q("select v from iconfig where iconfig.cat = 'system' and iconfig.k = 'CARD' and iconfig.iid = %d limit 1",
+ intval($parent_item['id'])
+ );
+ if($r) {
+ $plink = z_root() . '/cards/' . $channel['channel_address'] . '/' . $r[0]['v'];
+ }
+ }
// Fallback so that we alway have a thr_parent