diff options
author | olivierm <olivier@migeot.org> | 2011-03-08 14:39:26 +0100 |
---|---|---|
committer | olivierm <olivier@migeot.org> | 2011-03-08 14:39:26 +0100 |
commit | 25c674b73a5ec39a9826906aed3e35e77d72e392 (patch) | |
tree | dc17e0d8f5dc899ccfa9e0239fe7623c43a95d49 /mod/display.php | |
parent | 07ebc15612807512422ba84060914c5c4c853102 (diff) | |
parent | c248b28f922603ec135fea903a9ec3f0ef63c935 (diff) | |
download | volse-hubzilla-25c674b73a5ec39a9826906aed3e35e77d72e392.tar.gz volse-hubzilla-25c674b73a5ec39a9826906aed3e35e77d72e392.tar.bz2 volse-hubzilla-25c674b73a5ec39a9826906aed3e35e77d72e392.zip |
Merge remote branch 'mike/master'
Diffstat (limited to 'mod/display.php')
-rw-r--r-- | mod/display.php | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/mod/display.php b/mod/display.php index 7cefc42e6..edbadbc75 100644 --- a/mod/display.php +++ b/mod/display.php @@ -127,6 +127,8 @@ function display_content(&$a) { like_puller($a,$item,$dlike,'dislike'); } + $author_contacts = extract_item_authors($r,$a->profile['uid']); + foreach($r as $item) { $template = $tpl; @@ -172,17 +174,6 @@ function display_content(&$a) { $sparkle = ''; - $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'; - } - - // Top-level wall post not written by the wall owner (wall-to-wall) // First figure out who owns it. @@ -223,13 +214,14 @@ function display_content(&$a) { // 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 = $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 = ''; + elseif(isset($author_contacts[$item['author-link']])) { + $profile_link = $a->get_baseurl() . '/redir/' . $author_contacts[$item['author-link']]; + $sparkle = ' sparkle'; } } |