it's tough getting the photo menu right in all circumstances. Lots of variables. Much better now.
This commit is contained in:
parent
e88cf38604
commit
c3b42fdbcb
1 changed files with 11 additions and 8 deletions
|
@ -495,21 +495,24 @@ function item_photo_menu($item){
|
||||||
if((local_user() && ($profile_owner == 0))
|
if((local_user() && ($profile_owner == 0))
|
||||||
|| ($profile_owner && $profile_owner == local_user())) {
|
|| ($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;
|
$redir = $redirect_url;
|
||||||
|
$cid = $item['cid'];
|
||||||
|
}
|
||||||
elseif(isset($a->authors[$item['author-link']])) {
|
elseif(isset($a->authors[$item['author-link']])) {
|
||||||
$redir = $a->get_baseurl() . '/redir/' . $a->authors[$item['author-link']]['id'];
|
$redir = $a->get_baseurl() . '/redir/' . $a->authors[$item['author-link']]['id'];
|
||||||
$cid = $a->authors[$item['author-link']]['id'];
|
$cid = $a->authors[$item['author-link']]['id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if($item['network'] === 'dfrn' && (! $item['self'])) {
|
if((isset($cid)) && (! $item['self'])) {
|
||||||
|
$contact_url = $a->get_baseurl() . '/contacts/' . $cid;
|
||||||
|
if($item['network'] === 'dfrn') {
|
||||||
$status_link = $redir . "?url=status";
|
$status_link = $redir . "?url=status";
|
||||||
$profile_link = $redir . "?url=profile";
|
$profile_link = $redir . "?url=profile";
|
||||||
$photos_link = $redir . "?url=photos";
|
$photos_link = $redir . "?url=photos";
|
||||||
$pm_url = $a->get_baseurl() . '/message/new/' . $cid;
|
$pm_url = $a->get_baseurl() . '/message/new/' . $cid;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$contact_url = $item['self']?"":$a->get_baseurl() . '/contacts/' . (($item['cid']) ? $item['cid'] : $cid);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue