diff options
author | friendica <info@friendica.com> | 2014-01-09 16:23:58 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-01-09 16:23:58 -0800 |
commit | a78d9b973d6391e3a15f8a3ff2fe586a4bffe08c (patch) | |
tree | e5367a6951861eb88887c183e97ff0f3c1ba939a /include | |
parent | db8ebc9f375478bddc0f48d972e3acfbde80685a (diff) | |
download | volse-hubzilla-a78d9b973d6391e3a15f8a3ff2fe586a4bffe08c.tar.gz volse-hubzilla-a78d9b973d6391e3a15f8a3ff2fe586a4bffe08c.tar.bz2 volse-hubzilla-a78d9b973d6391e3a15f8a3ff2fe586a4bffe08c.zip |
simplify permalink selection logic
Diffstat (limited to 'include')
-rw-r--r-- | include/ItemObject.php | 2 | ||||
-rw-r--r-- | include/conversation.php | 2 | ||||
-rw-r--r-- | include/enotify.php | 4 | ||||
-rwxr-xr-x | include/text.php | 4 |
4 files changed, 7 insertions, 5 deletions
diff --git a/include/ItemObject.php b/include/ItemObject.php index 40f85f5ef..9a62cee4b 100644 --- a/include/ItemObject.php +++ b/include/ItemObject.php @@ -232,7 +232,7 @@ class Item extends BaseObject { 'like' => $like, 'dislike' => ((feature_enabled($conv->get_profile_owner(),'dislike')) ? $dislike : ''), 'share' => $share, - 'plink' => get_plink($item,$mode), + 'plink' => get_plink($item), '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 : ''), diff --git a/include/conversation.php b/include/conversation.php index 62db34974..5977b65e8 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -692,7 +692,7 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional', $ 'owner_name' => $owner_name, 'owner_url' => $owner_url, 'owner_photo' => $owner_photo, - 'plink' => get_plink($item,$mode), + 'plink' => get_plink($item,false), 'edpost' => false, 'isstarred' => $isstarred, 'star' => $star, diff --git a/include/enotify.php b/include/enotify.php index 49d690511..e0991257f 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -94,6 +94,9 @@ function notification($params) { if($params['type'] == NOTIFY_COMMENT) { // logger("notification: params = " . print_r($params, true), LOGGER_DEBUG); + $itemlink = $params['link']; + + // ignore like/unlike activity on posts - they probably require a sepearate notification preference if(array_key_exists('item',$params) && (! visible_activity($params['item']))) @@ -171,7 +174,6 @@ function notification($params) { $sitelink = t('Please visit %s to view and/or reply to the conversation.'); $tsitelink = sprintf( $sitelink, $siteurl ); $hsitelink = sprintf( $sitelink, '<a href="' . $siteurl . '">' . $sitename . '</a>'); - $itemlink = $params['link']; } if($params['type'] == NOTIFY_WALL) { diff --git a/include/text.php b/include/text.php index b47f0518a..f5c440e4a 100755 --- a/include/text.php +++ b/include/text.php @@ -1389,9 +1389,9 @@ function feed_salmonlinks($nick) { } -function get_plink($item,$mode) { +function get_plink($item,$conversation_mode = true) { $a = get_app(); - if(($mode == 'display') || ($mode == 'channel') || ($mode == 'network')) + if($conversation_mode) $key = 'plink'; else $key = 'llink'; |