aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-08-29 19:38:07 -0700
committerzotlabs <mike@macgirvin.com>2017-08-29 19:38:07 -0700
commit973f15438adb44f50e01807013b3f23e25bda2c8 (patch)
treee4e67e24fe1b2d01376df317304fd4d69c4be65c /Zotlabs/Module
parent1f42d2333271cec8c439abe0ebb0ecd05b1954f5 (diff)
downloadvolse-hubzilla-973f15438adb44f50e01807013b3f23e25bda2c8.tar.gz
volse-hubzilla-973f15438adb44f50e01807013b3f23e25bda2c8.tar.bz2
volse-hubzilla-973f15438adb44f50e01807013b3f23e25bda2c8.zip
fix category links in card bodies
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Item.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php
index a86106b6a..3e023ae8b 100644
--- a/Zotlabs/Module/Item.php
+++ b/Zotlabs/Module/Item.php
@@ -659,14 +659,23 @@ class Item extends \Zotlabs\Web\Controller {
// BBCODE end alert
if(strlen($categories)) {
+
$cats = explode(',',$categories);
foreach($cats as $cat) {
+
+ if($webpage == ITEM_TYPE_CARD) {
+ $catlink = z_root() . '/cards/' . $channel['channel_address'] . '?f=&cat=' . urlencode(trim($cat));
+ }
+ else {
+ $catlink = $owner_xchan['xchan_url'] . '?f=&cat=' . urlencode(trim($cat));
+ }
+
$post_tags[] = array(
'uid' => $profile_uid,
'ttype' => TERM_CATEGORY,
'otype' => TERM_OBJ_POST,
'term' => trim($cat),
- 'url' => $owner_xchan['xchan_url'] . '?f=&cat=' . urlencode(trim($cat))
+ 'url' => $catlink
);
}
}