From 131c339c5ab61196fc0628b313221431e2fe421c Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Fri, 22 Oct 2010 02:08:38 +0000 Subject: Pass OAuth authorize page's mode paramater to OpenID plugin so it can create a correct returnto URL --- actions/apioauthauthorize.php | 1 + plugins/OpenID/OpenIDPlugin.php | 10 ++++++++-- 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... -- cgit v1.2.3