aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-01-09 14:10:51 -0800
committerfriendica <info@friendica.com>2014-01-09 14:10:51 -0800
commitbf31ec04cfceebc2657a8a573580cff036db5bef (patch)
treeda4646411f6946e7cfecd86cc821a22d07281bb9 /include/items.php
parentc6b9e443530fa2598f931571a0aa026b7bef8992 (diff)
parentacdf053a0bec73acaad3f6c0e0625aa860a4b9b3 (diff)
downloadvolse-hubzilla-bf31ec04cfceebc2657a8a573580cff036db5bef.tar.gz
volse-hubzilla-bf31ec04cfceebc2657a8a573580cff036db5bef.tar.bz2
volse-hubzilla-bf31ec04cfceebc2657a8a573580cff036db5bef.zip
Merge pull request #259 from zzottel/master
Finish up channel/ plinks
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/items.php b/include/items.php
index 781956882..d5eea1e6f 100755
--- a/include/items.php
+++ b/include/items.php
@@ -1602,8 +1602,14 @@ 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() && ($arr['item_flags'] & ITEM_THREAD_TOP)) {
+ $channel = get_app()->get_channel();
+ $arr['plink'] = z_root() . '/channel/' . $channel['channel_address'] . '/?mid=' . $arr['mid'];
+ } else {
+ $arr['plink'] = $arr['llink'];
+ }
+ }
if($arr['parent_mid'] === $arr['mid']) {
$parent_id = 0;