From 7e16f8cdae597cc8329c3cc9ce769d512ba84085 Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Mon, 12 Jul 2010 23:08:07 -0700 Subject: groups and acls --- mod/profile.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mod/profile.php') diff --git a/mod/profile.php b/mod/profile.php index 5d1b04b33..37bf04a0c 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -141,8 +141,9 @@ function profile_content(&$a) { $o .= replace_macros($tpl,array( '$baseurl' => $a->get_baseurl(), + '$visitor' => (($_SESSION['uid'] == $a->profile['profile_uid']) ? 'block' : 'none'), '$lockstate' => 'unlock', - '$acl' => populate_acl(), + '$acl' => (($_SESSION['uid'] == $a->profile['profile_uid']) ? populate_acl() : ''), '$profile_uid' => $a->profile['profile_uid'] )); } @@ -165,7 +166,6 @@ function profile_content(&$a) { $sql_extra = ''; // authenticated visitor - here lie dragons - elseif(remote_user()) { $gs = '<<>>'; // should be impossible to match if(count($groups)) { @@ -178,8 +178,8 @@ function profile_content(&$a) { AND ( `allow_gid` = '' OR `allow_gid` REGEXP '%s' ) AND ( `deny_gid` = '' OR NOT `deny_gid` REGEXP '%s') ", - intval($visitor_id), - intval($visitor_id), + intval($_SESSION['visitor_id']), + intval($_SESSION['visitor_id']), $gs, $gs ); -- cgit v1.2.3