aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-04-05 20:07:54 -0700
committerFriendika <info@friendika.com>2011-04-05 20:07:54 -0700
commitd2b28206ceb093f908f131980f9a02adbce327d2 (patch)
treec3100c82b8432374f6cdc44e82627d6ce877b56f
parent438473529c667f151aefcede1d7fa6b8b22f2d91 (diff)
downloadvolse-hubzilla-d2b28206ceb093f908f131980f9a02adbce327d2.tar.gz
volse-hubzilla-d2b28206ceb093f908f131980f9a02adbce327d2.tar.bz2
volse-hubzilla-d2b28206ceb093f908f131980f9a02adbce327d2.zip
profile edit link missing in photo menu for non-dfrn contacts
-rw-r--r--boot.php35
1 files changed, 16 insertions, 19 deletions
diff --git a/boot.php b/boot.php
index eb8048915..1d7135b29 100644
--- a/boot.php
+++ b/boot.php
@@ -2701,27 +2701,24 @@ function item_photo_menu($item){
// Then check if we can use a sparkle (redirect) link to the profile by virtue of it being our contact
// or a friend's contact that we both have a connection to.
- if(((local_user() && ($profile_owner == 0))
- || ($profile_owner && $profile_owner == local_user()))
- && strlen($item['author-link'])) {
-
- if(link_compare($item['author-link'],$item['url']) && ($item['network'] === 'dfrn') && (! $item['self'])) {
- $status_link = $redirect_url."?url=status";
- $profile_link = $redirect_url."?url=profile";
- $photos_link = $redirect_url."?url=photos";
- $pm_url = $a->get_baseurl() . '/message/new/' . $item['cid'];
- $contact_url = $item['self']?"":$a->get_baseurl() . '/contacts/' . $item['cid'];
- }
+ if((local_user() && ($profile_owner == 0))
+ || ($profile_owner && $profile_owner == local_user())) {
+
+ if(strlen($item['author-link']) && link_compare($item['author-link'],$item['url']))
+ $redir = $redirect_url;
elseif(isset($a->authors[$item['author-link']])) {
- $redirect_url = $a->get_baseurl() . '/redir/' . $a->authors[$item['author-link']]['id'];
- $status_link = $redirect_url."?url=status";
- $profile_link = $redirect_url."?url=profile";
- $photos_link = $redirect_url."?url=photos";
- if ($a->authors[$item['author-link']]['network']==='dfrn'){
- $pm_url = $a->get_baseurl() . '/message/new/' . $a->authors[$item['author-link']]['id'];
- }
- $contact_url = $item['self']?"":$a->get_baseurl() . '/contacts/' . $a->authors[$item['author-link']]['id'] ;
+ $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;
+ }
+
+ $contact_url = $item['self']?"":$a->get_baseurl() . '/contacts/' . (($item['cid']) ? $item['cid'] : $cid);
}