summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-10-22 02:08:38 +0000
committerZach Copley <zach@status.net>2010-10-22 02:08:38 +0000
commit131c339c5ab61196fc0628b313221431e2fe421c (patch)
tree566a68dede7c302cbd5419b9c08615fadeacddf7
parentac45f661f6eb34755338bc16df3bcc6db391c3c2 (diff)
Pass OAuth authorize page's mode paramater to OpenID plugin so it can create a correct
returnto URL
-rw-r--r--actions/apioauthauthorize.php1
-rw-r--r--plugins/OpenID/OpenIDPlugin.php10
2 files changed, 9 insertions, 2 deletions
diff --git a/actions/apioauthauthorize.php b/actions/apioauthauthorize.php
index 74f75ff66..9929c36c0 100644
--- a/actions/apioauthauthorize.php
+++ b/actions/apioauthauthorize.php
@@ -379,6 +379,7 @@ class ApiOauthAuthorizeAction extends Action
_('Allow or deny access'));
$this->hidden('token', common_session_token());
+ $this->hidden('mode', $this->mode);
$this->hidden('oauth_token', $this->oauthTokenParam);
$this->hidden('oauth_callback', $this->callback);
diff --git a/plugins/OpenID/OpenIDPlugin.php b/plugins/OpenID/OpenIDPlugin.php
index d8127aa68..cdaabbbf7 100644
--- a/plugins/OpenID/OpenIDPlugin.php
+++ b/plugins/OpenID/OpenIDPlugin.php
@@ -713,8 +713,14 @@ class OpenIDPlugin extends Plugin
require_once dirname(__FILE__) . '/openid.php';
oid_assert_allowed($openid_url);
- $returnto = common_local_url('ApiOauthAuthorize', array(),
- array('oauth_token' => $action->arg('oauth_token')));
+ $returnto = common_local_url(
+ 'ApiOauthAuthorize',
+ array(),
+ array(
+ 'oauth_token' => $action->arg('oauth_token'),
+ 'mode' => $action->arg('mode')
+ )
+ );
common_set_returnto($returnto);
// This will redirect if functional...