diff options
author | Friendika <info@friendika.com> | 2011-04-14 16:40:14 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-04-14 16:40:14 -0700 |
commit | c3b42fdbcb2165045e0ae759e103cc7d44b3f584 (patch) | |
tree | fb7b7c1000e876fc4df91d3340b5ef719c38c3b9 | |
parent | e88cf386043f0816b6b13fa87308998f64ef5f1e (diff) | |
download | volse-hubzilla-c3b42fdbcb2165045e0ae759e103cc7d44b3f584.tar.gz volse-hubzilla-c3b42fdbcb2165045e0ae759e103cc7d44b3f584.tar.bz2 volse-hubzilla-c3b42fdbcb2165045e0ae759e103cc7d44b3f584.zip |
it's tough getting the photo menu right in all circumstances. Lots of variables. Much better now.
-rw-r--r-- | include/conversation.php | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/include/conversation.php b/include/conversation.php index 5c8327e56..b2d20300f 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -495,21 +495,24 @@ 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((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); } |