aboutsummaryrefslogtreecommitdiffstats
path: root/mod/profile.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-08-19 04:59:31 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-08-19 04:59:31 -0700
commite0045a43e22082e0a47fd57288105a21311e911a (patch)
treed20f36060be22a5c83526ca2a3654f1e4a31ace0 /mod/profile.php
parent6ed5b642a437a86077093391f3f2ec9889068d8d (diff)
downloadvolse-hubzilla-e0045a43e22082e0a47fd57288105a21311e911a.tar.gz
volse-hubzilla-e0045a43e22082e0a47fd57288105a21311e911a.tar.bz2
volse-hubzilla-e0045a43e22082e0a47fd57288105a21311e911a.zip
mongo checkin, global directory, redir rework, location basics
Diffstat (limited to 'mod/profile.php')
-rw-r--r--mod/profile.php18
1 files changed, 12 insertions, 6 deletions
diff --git a/mod/profile.php b/mod/profile.php
index 119b523a6..808ceedb8 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -64,9 +64,11 @@ function profile_init(&$a) {
$profile = $a->argv[1];
}
profile_load($a,$which,$profile);
- $a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . $a->get_baseurl() . '/dfrn_poll/' . $which .'" />';
+ $a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . $a->get_baseurl() . '/dfrn_poll/' . $which .'" />' . "\r\n" ;
- $a->page['htmlhead'] .= "<meta name=\"dfrn-template\" content=\"" . $a->get_baseurl() . "/profile/%s" . "\" />\r\n";
+ $a->page['htmlhead'] .= '<meta name="dfrn-template" content="' . $a->get_baseurl() . "/profile/%s" . '" />' . "\r\n" ;
+ $a->page['htmlhead'] .= '<meta name="dfrn-global-visibility" content="' . (($a->profile['net-publish']) ? 'true' : 'false') . '" />' . "\r\n" ;
+
$dfrn_pages = array('request', 'confirm', 'notify', 'poll');
foreach($dfrn_pages as $dfrn)
@@ -99,9 +101,11 @@ function profile_content(&$a, $update = false) {
if(count($r))
$contact = $r[0];
}
- if(local_user()) {
- $contact_id = $_SESSION['cid'];
- $contact = $a->contact;
+ else {
+ if(local_user()) {
+ $contact_id = $_SESSION['cid'];
+ $contact = $a->contact;
+ }
}
if($update) {
@@ -261,7 +265,8 @@ function profile_content(&$a, $update = false) {
// This is my profile but I'm not the author of this post/comment. If it's somebody that's a fan or mutual friend,
// I can go directly to their profile as an authenticated guest.
- if(local_user() && ($item['contact-uid'] == $_SESSION['uid']) && (strlen($item['dfrn-id'])) && (! $item['self'] ))
+ if(local_user() && ($item['contact-uid'] == $_SESSION['uid'])
+ && ($item['rel'] == DIRECTION_IN || $item['rel'] == DIRECTION_BOTH) && (! $item['self'] ))
$profile_url = $redirect_url;
// FIXME tryng to solve the mishmash of profile photos.
@@ -294,6 +299,7 @@ function profile_content(&$a, $update = false) {
'$title' => $item['title'],
'$body' => bbcode($item['body']),
'$ago' => relative_date($item['created']),
+ '$location' => (($item['location']) ? '<a target="map" href="http://maps.google.com/?q=' . urlencode($item['location']) . '">' . $item['location'] . '</a>' : ''),
'$indent' => (($item['parent'] != $item['item_id']) ? ' comment' : ''),
'$drop' => $drop,
'$comment' => $comment