aboutsummaryrefslogtreecommitdiffstats
path: root/mod/display.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-01-23 21:26:09 -0800
committerFriendika <info@friendika.com>2011-01-23 21:26:09 -0800
commit205a2b8930c9d519c06f106d5d37702f8f69d013 (patch)
treea69a241e72682d9b2be7364d9c683517d00d7e8b /mod/display.php
parent5be98e3ec8b0475dc67504967cac695d9e4a129a (diff)
downloadvolse-hubzilla-205a2b8930c9d519c06f106d5d37702f8f69d013.tar.gz
volse-hubzilla-205a2b8930c9d519c06f106d5d37702f8f69d013.tar.bz2
volse-hubzilla-205a2b8930c9d519c06f106d5d37702f8f69d013.zip
owner's sparkle link, sometimes not author's - on display page
Diffstat (limited to 'mod/display.php')
-rw-r--r--mod/display.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/mod/display.php b/mod/display.php
index aed114abc..3215ae90a 100644
--- a/mod/display.php
+++ b/mod/display.php
@@ -173,6 +173,9 @@ function display_content(&$a) {
$redirect_url = $a->get_baseurl() . '/redir/' . $item['cid'] ;
+ // I think this is redundant now but too chicken to remove it unless
+ // I've had six cups of coffee and tested it completely
+
if(($item['network'] === 'dfrn') && (! $item['self'] )) {
$profile_url = $redirect_url;
$sparkle = ' sparkle';
@@ -216,7 +219,18 @@ function display_content(&$a) {
$profile_name = (((strlen($item['author-name'])) && $diff_author) ? $item['author-name'] : $item['name']);
$profile_avatar = (((strlen($item['author-avatar'])) && $diff_author) ? $item['author-avatar'] : $item['thumb']);
- $profile_link = $profile_url;
+ // Can we use our special contact URL for this author?
+
+ if(strlen($item['author-link'])) {
+ if((link_compare($item['author-link'],$item['url'])) && ($item['network'] === 'dfrn') && (! $item['self'])) {
+ $profile_link = $redirect_url;
+ $sparkle = ' sparkle';
+ }
+ else {
+ $profile_link = $item['author-link'];
+ $sparkle = '';
+ }
+ }
if(($item['contact-id'] == remote_user()) || ($item['uid'] == local_user()))
$drop = replace_macros(load_view_file('view/wall_item_drop.tpl'), array('$id' => $item['id']));