diff options
author | friendica <info@friendica.com> | 2013-10-30 20:42:43 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-10-30 20:42:43 -0700 |
commit | d61347201ecf45b159756d0954020dcadda261cb (patch) | |
tree | d325a72e2eb3d01a21c1640067a490dcb1c72ff2 /mod/rpost.php | |
parent | 39318e299ee36f4c14314b38238390e9b6e007bc (diff) | |
download | volse-hubzilla-d61347201ecf45b159756d0954020dcadda261cb.tar.gz volse-hubzilla-d61347201ecf45b159756d0954020dcadda261cb.tar.bz2 volse-hubzilla-d61347201ecf45b159756d0954020dcadda261cb.zip |
allow rpost parameters to survive a login if you weren't locally logged in at the time.
Diffstat (limited to 'mod/rpost.php')
-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']; } |