aboutsummaryrefslogtreecommitdiffstats
path: root/mod/profile.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-07-16 06:24:41 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-07-16 06:24:41 -0700
commit059e090b53643cb07a2634b700ada5cf3b6894e8 (patch)
tree0885c33ceb58ebcd0e713eb656484c294efab112 /mod/profile.php
parent56a37deb7399075e35e4a174d609c9e8424095db (diff)
downloadvolse-hubzilla-059e090b53643cb07a2634b700ada5cf3b6894e8.tar.gz
volse-hubzilla-059e090b53643cb07a2634b700ada5cf3b6894e8.tar.bz2
volse-hubzilla-059e090b53643cb07a2634b700ada5cf3b6894e8.zip
sorting out visitor sessions
Diffstat (limited to 'mod/profile.php')
-rw-r--r--mod/profile.php23
1 files changed, 13 insertions, 10 deletions
diff --git a/mod/profile.php b/mod/profile.php
index 5a1ac0639..6bd265562 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -43,12 +43,6 @@ function profile_load(&$a,$uid,$profile = 0) {
function profile_init(&$a) {
- if($_SESSION['authenticated']) {
-
- // choose which page to show (could be remote auth)
-
- }
-
if($a->argc > 1)
$which = $a->argv[1];
else {
@@ -57,6 +51,15 @@ function profile_init(&$a) {
return;
}
+ if(($remote_user) && ($a->argc > 2) && ($a->argv[2] == 'visit'))
+ $_SESSION['is_visitor'] = 1;
+ else {
+ unset($_SESSION['is_visitor']);
+ unset($_SESSION['visitor_id']);
+ if(! $_SESSION['uid'])
+ unset($_SESSION['authenticated']);
+ }
+
profile_load($a,$which);
$a->page['htmlhead'] .= "<meta name=\"dfrn-template\" content=\"" . $a->get_baseurl() . "/profile/%s" . "\" />\r\n";
@@ -79,9 +82,9 @@ function item_display(&$a, $item,$template,$comment) {
$o .= replace_macros($template,array(
'$id' => $item['item_id'],
- '$profile_url' => $profile_url,
- '$name' => $item['name'],
- '$thumb' => $thumb,
+ '$profile_url' => ((strlen($item['remote-link'])) ? $item['remote-link'] : $profile_url),
+ '$name' => ((strlen($item['remote-name'])) ? $item['remote-name'] : $item['name']),
+ '$thumb' => ((strlen($item['remote-avatar'])) ? $item['remote-avatar'] : $thumb),
'$body' => bbcode($item['body']),
'$ago' => relative_date($item['created']),
'$indent' => (($item['parent'] != $item['item_id']) ? 'comment-' : ''),
@@ -196,7 +199,7 @@ function profile_content(&$a) {
if(count($r))
$a->set_pager_total($r[0]['total']);
-
+dbg(2);
$r = q("SELECT `item`.*, `item`.`id` AS `item_id`,
`contact`.`name`, `contact`.`photo`, `contact`.`url`,