From fc8379b1080823bb69664aa4119ba190e1f5b1ca Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Sat, 24 Jul 2010 23:20:20 -0700 Subject: live updates sort of working --- mod/profile.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'mod/profile.php') diff --git a/mod/profile.php b/mod/profile.php index aa13f0a78..0cfe22807 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -212,13 +212,18 @@ function profile_content(&$a, $update = false) { $redirect_url = $a->get_baseurl() . '/redir/' . $item['cid'] ; - if(can_write_wall($a,$a->profile['profile_uid'])) { + if($update) + $return_url = $_SESSION['return_url']; + else + $return_url = $_SESSION['return_url'] = $a->cmd; + + if(can_write_wall($a,$a->profile['uid'])) { if($item['last-child']) { $comment = replace_macros($cmnt_tpl,array( - '$return_path' => $a->cmd, + '$return_path' => $_SESSION['return_url'], '$id' => $item['item_id'], '$parent' => $item['parent'], - '$profile_uid' => $a->profile['profile_uid'], + '$profile_uid' => $a->profile['uid'], '$ww' => '' )); } -- cgit v1.2.3