]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Pass OAuth authorize page's mode paramater to OpenID plugin so it can create a correct
authorZach Copley <zach@status.net>
Fri, 22 Oct 2010 02:08:38 +0000 (02:08 +0000)
committerZach Copley <zach@status.net>
Fri, 22 Oct 2010 02:08:38 +0000 (02:08 +0000)
returnto URL

actions/apioauthauthorize.php
plugins/OpenID/OpenIDPlugin.php

index 74f75ff66040de24680614a06fad19af5c989cc3..9929c36c0d9131e9b089b2d9521b64027ab8f551 100644 (file)
@@ -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);
 
index d8127aa68bea2ea1d7dc31eda257b7a1ba8f7868..cdaabbbf7fd97fa0b7e2adf56508171effece8f2 100644 (file)
@@ -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...