diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/rpost.php | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/mod/rpost.php b/mod/rpost.php index ddcd3c53f..7ce403484 100644 --- a/mod/rpost.php +++ b/mod/rpost.php @@ -45,13 +45,22 @@ function rpost_content(&$a) { } } - // FIXME - // probably need to figure out how to preserve the $_REQUEST variables in the session - // in case you aren't currently logged in. Otherwise you'll have to go back to - // the site that sent you here and try again. + // The login procedure is going to bugger our $_REQUEST variables + // so save them in the session. + + if(array_key_exists($_REQUEST,'body')) { + $_SESSION['rpost'] = $_REQUEST; + } return login(); } + // If we have saved rpost session variables, but nothing in the current $_REQUEST, recover the saved variables + + if((! array_key_exists($_REQUEST,'body')) && (array_key_exists($_SESSION,'rpost'))) { + $_REQUEST = $_SESSION['rpost']; + unset($_SESSION['rpost']); + } + if($_REQUEST['remote_return']) { $_SESSION['remote_return'] = $_REQUEST['remote_return']; } |