MaxSem has uploaded a new change for review.
https://gerrit.wikimedia.org/r/75154
Change subject: Add 2 new hooks to fix mobile logins
......................................................................
Add 2 new hooks to fix mobile logins
Bug 51789 is caused by loginwiki always redirecting back to desktop domain -
this patch gives MobileFrontend a chance to save the mobile host and then
redirect to it.
Change-Id: I3991ae4d90b3943e75cb2b869074094e56f2ccbf
---
M CentralAuthHooks.php
M specials/SpecialCentralLogin.php
2 files changed, 4 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth
refs/changes/54/75154/1
diff --git a/CentralAuthHooks.php b/CentralAuthHooks.php
index 1fb8463..62db3d2 100644
--- a/CentralAuthHooks.php
+++ b/CentralAuthHooks.php
@@ -437,6 +437,7 @@
'finalProto' => $finalProto,
'currentProto' => $request->detectProtocol()
);
+ wfRunHooks( 'CentralAuthLoginRedirectData', array(
$centralUser, &$data ) );
$wgMemc->set( $key, $data, 60 );
$wiki = WikiMap::getWiki( $wgCentralAuthLoginWiki );
diff --git a/specials/SpecialCentralLogin.php b/specials/SpecialCentralLogin.php
index 272018c..96501ce 100644
--- a/specials/SpecialCentralLogin.php
+++ b/specials/SpecialCentralLogin.php
@@ -109,9 +109,9 @@
$url = $info['currentProto'] . ':' . $url;
if ( $wgCentralAuthSilentLogin ) {
- $this->getOutput()->redirect( // expands to
PROTO_CURRENT if $url doesn't have protocol
- wfAppendQuery( $url, array( 'token' => $token )
)
- );
+ $url = wfAppendQuery( $url, array( 'token' => $token )
); // expands to PROTO_CURRENT if $url doesn't have protocol
+ wfRunHooks( 'CentralAuthSilentLoginRedirect', array(
$centralUser, &$url, $info ) );
+ $this->getOutput()->redirect( $url );
} else {
$this->getOutput()->addHtml(
Xml::openElement( 'form',
--
To view, visit https://gerrit.wikimedia.org/r/75154
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3991ae4d90b3943e75cb2b869074094e56f2ccbf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: MaxSem <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits