diff options
author | anaqreon <tamanning@zoho.com> | 2014-12-30 16:06:35 -0600 |
---|---|---|
committer | anaqreon <tamanning@zoho.com> | 2014-12-30 16:06:35 -0600 |
commit | b78a545a1056e6db9f4b6b4f262182b0a5c56e67 (patch) | |
tree | 515c2f742a5a39e18b00debf1849ee9703fa4a42 /include/ItemObject.php | |
parent | d67c5a6ffd134602084a6dcb37b316bf768bf715 (diff) | |
parent | 43671a0a323afa758df56c06822ce3c46da026df (diff) | |
download | volse-hubzilla-b78a545a1056e6db9f4b6b4f262182b0a5c56e67.tar.gz volse-hubzilla-b78a545a1056e6db9f4b6b4f262182b0a5c56e67.tar.bz2 volse-hubzilla-b78a545a1056e6db9f4b6b4f262182b0a5c56e67.zip |
Merge pull request #1 from friendica/master
Pull from upstream
Diffstat (limited to 'include/ItemObject.php')
-rw-r--r-- | include/ItemObject.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/ItemObject.php b/include/ItemObject.php index 6037daa7a..ec8116297 100644 --- a/include/ItemObject.php +++ b/include/ItemObject.php @@ -231,7 +231,14 @@ class Item extends BaseObject { localize_item($item); $body = prepare_body($item,true); - + + // $viewthread (below) is only valid in list mode. If this is a channel page, build the thread viewing link + // since we can't depend on llink or plink pointing to the right local location. + + $owner_address = substr($item['owner']['xchan_addr'],0,strpos($item['owner']['xchan_addr'],'@')); + $viewthread = $item['llink']; + if($conv->get_mode() === 'channel') + $viewthread = z_root() . '/channel/' . $owner_address . '?f=&mid=' . $item['mid']; $comment_count_txt = sprintf( tt('%d comment','%d comments',$total_children),$total_children ); $list_unseen_txt = (($unseen_comments) ? sprintf('%d unseen',$unseen_comments) : ''); @@ -249,6 +256,7 @@ class Item extends BaseObject { 'linktitle' => sprintf( t('View %s\'s profile - %s'), $profile_name, $item['author']['xchan_addr']), 'olinktitle' => sprintf( t('View %s\'s profile - %s'), $this->get_owner_name(), $item['owner']['xchan_addr']), 'llink' => $item['llink'], + 'viewthread' => $viewthread, 'to' => t('to'), 'via' => t('via'), 'wall' => t('Wall-to-Wall'), @@ -284,7 +292,7 @@ class Item extends BaseObject { 'share' => $share, 'rawmid' => $item['mid'], 'plink' => get_plink($item), - 'edpost' => ((feature_enabled($conv->get_profile_owner(),'edit_posts')) ? $edpost : ''), + 'edpost' => $edpost, // ((feature_enabled($conv->get_profile_owner(),'edit_posts')) ? $edpost : ''), 'star' => ((feature_enabled($conv->get_profile_owner(),'star_posts')) ? $star : ''), 'tagger' => ((feature_enabled($conv->get_profile_owner(),'commtag')) ? $tagger : ''), 'filer' => ((feature_enabled($conv->get_profile_owner(),'filing')) ? $filer : ''), @@ -627,7 +635,7 @@ class Item extends BaseObject { '$edimg' => t('Image'), '$edurl' => t('Link'), '$edvideo' => t('Video'), - '$preview' => ((feature_enabled($conv->get_profile_owner(),'preview')) ? t('Preview') : ''), + '$preview' => t('Preview'), // ((feature_enabled($conv->get_profile_owner(),'preview')) ? t('Preview') : ''), '$indent' => $indent, '$feature_encrypt' => ((feature_enabled($conv->get_profile_owner(),'content_encrypt')) ? true : false), '$encrypt' => t('Encrypt text'), |