diff options
author | Fabio Comuni <fabrix.xm@gmail.com> | 2011-04-18 16:58:20 +0200 |
---|---|---|
committer | Fabio Comuni <fabrix.xm@gmail.com> | 2011-04-18 16:58:20 +0200 |
commit | ee1641393550eea9200f792707070e024879d466 (patch) | |
tree | ee9e19d380cdf4fee74d4b7c1fa323098c72b93b /include/conversation.php | |
parent | 62dbfffe399333cd4a792cc77256a2bcd689a14f (diff) | |
parent | 741a262f1b2d5c8f911896da32e80d543afb5cd1 (diff) | |
download | volse-hubzilla-ee1641393550eea9200f792707070e024879d466.tar.gz volse-hubzilla-ee1641393550eea9200f792707070e024879d466.tar.bz2 volse-hubzilla-ee1641393550eea9200f792707070e024879d466.zip |
Merge remote-tracking branch 'friendika-master/master'
Diffstat (limited to 'include/conversation.php')
-rw-r--r-- | include/conversation.php | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/include/conversation.php b/include/conversation.php index 5c8327e56..4c858d818 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -85,6 +85,8 @@ function conversation(&$a, $items, $mode, $update) { $profile_name = ((strlen($item['author-name'])) ? $item['author-name'] : $item['name']); $profile_avatar = ((strlen($item['author-avatar'])) ? $item['author-avatar'] : $item['thumb']); $profile_link = ((strlen($item['author-link'])) ? $item['author-link'] : $item['url']); + if($profile_link === 'mailbox') + $profile_link = ''; $redirect_url = $a->get_baseurl() . '/redir/' . $item['cid'] ; @@ -360,6 +362,9 @@ function conversation(&$a, $items, $mode, $update) { else $profile_link = $item['url']; + if($profile_link === 'mailbox') + $profile_link = ''; + $like = ((x($alike,$item['id'])) ? format_like($alike[$item['id']],$alike[$item['id'] . '-l'],'like',$item['id']) : ''); $dislike = ((x($dlike,$item['id'])) ? format_like($dlike[$item['id']],$dlike[$item['id'] . '-l'],'dislike',$item['id']) : ''); @@ -483,6 +488,9 @@ function item_photo_menu($item){ $profile_link = ((strlen($item['author-link'])) ? $item['author-link'] : $item['url']); $redirect_url = $a->get_baseurl() . '/redir/' . $item['cid'] ; + if($profile_link === 'mailbox') + $profile_link = ''; + // $item['contact-uid'] is only set on profile page and indicates the uid of the user who owns the profile. $profile_owner = ((x($item,'contact-uid')) && intval($item['contact-uid']) ? intval($item['contact-uid']) : 0); @@ -495,21 +503,26 @@ function item_photo_menu($item){ if((local_user() && ($profile_owner == 0)) || ($profile_owner && $profile_owner == local_user())) { - if(strlen($item['author-link']) && link_compare($item['author-link'],$item['url'])) + if(strlen($item['author-link']) && link_compare($item['author-link'],$item['url'])) { $redir = $redirect_url; + $cid = $item['cid']; + } elseif(isset($a->authors[$item['author-link']])) { $redir = $a->get_baseurl() . '/redir/' . $a->authors[$item['author-link']]['id']; $cid = $a->authors[$item['author-link']]['id']; } - - if($item['network'] === 'dfrn' && (! $item['self'])) { - $status_link = $redir . "?url=status"; - $profile_link = $redir . "?url=profile"; - $photos_link = $redir . "?url=photos"; - $pm_url = $a->get_baseurl() . '/message/new/' . $cid; + if($item['author-link'] === 'mailbox') + $cid = $item['cid']; + + if((isset($cid)) && (! $item['self'])) { + $contact_url = $a->get_baseurl() . '/contacts/' . $cid; + if($item['network'] === 'dfrn') { + $status_link = $redir . "?url=status"; + $profile_link = $redir . "?url=profile"; + $photos_link = $redir . "?url=photos"; + $pm_url = $a->get_baseurl() . '/message/new/' . $cid; + } } - - $contact_url = $item['self']?"":$a->get_baseurl() . '/contacts/' . (($item['cid']) ? $item['cid'] : $cid); } |