aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzottel <github@zottel.net>2014-01-09 16:02:40 +0100
committerzottel <github@zottel.net>2014-01-09 16:02:40 +0100
commitc0f6d7319524f8fb8bac764d6e2f306335d2266b (patch)
tree441b0b35280b7d184ae2d352e058796bca7081a3
parentcd65d172baab020802421db8e5b5d54033dafaa8 (diff)
downloadvolse-hubzilla-c0f6d7319524f8fb8bac764d6e2f306335d2266b.tar.gz
volse-hubzilla-c0f6d7319524f8fb8bac764d6e2f306335d2266b.tar.bz2
volse-hubzilla-c0f6d7319524f8fb8bac764d6e2f306335d2266b.zip
save channel/<channel>/?mid=... plinks with the items
-rwxr-xr-xinclude/items.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/items.php b/include/items.php
index 781956882..883458b6e 100755
--- a/include/items.php
+++ b/include/items.php
@@ -1602,8 +1602,15 @@ function item_store($arr,$allow_exec = false) {
$arr['llink'] = z_root() . '/display/' . $arr['mid'];
- if(! $arr['plink'])
- $arr['plink'] = $arr['llink'];
+ if(! $arr['plink']) {
+ if (local_user()){
+ $channel = get_app()->get_channel();
+ $arr['plink'] = z_root() . '/channel/' . $channel['channel_address'] . '/?mid=' . $arr['mid'];
+ } else {
+ // can this ever happen?
+ $arr['plink'] = $arr['llink'];
+ }
+ }
if($arr['parent_mid'] === $arr['mid']) {
$parent_id = 0;