https://www.mediawiki.org/wiki/Special:Code/MediaWiki/106291
Revision: 106291
Author: preilly
Date: 2011-12-15 00:28:05 +0000 (Thu, 15 Dec 2011)
Log Message:
-----------
1.18wmf1: MFT r106286 - 106290
Modified Paths:
--------------
branches/wmf/1.18wmf1/extensions/MobileFrontend/MobileFrontend.php
Modified: branches/wmf/1.18wmf1/extensions/MobileFrontend/MobileFrontend.php
===================================================================
--- branches/wmf/1.18wmf1/extensions/MobileFrontend/MobileFrontend.php
2011-12-15 00:26:56 UTC (rev 106290)
+++ branches/wmf/1.18wmf1/extensions/MobileFrontend/MobileFrontend.php
2011-12-15 00:28:05 UTC (rev 106291)
@@ -423,9 +423,9 @@
public function beforePageRedirect( $out, &$redirect, &$code ) {
if ( $out->getTitle()->isSpecial( 'Userlogin' ) ) {
- global $wgMobileDomain, $wgRequest;
- $requestURL = $wgRequest->getFullRequestURL();
- if ( stristr( $requestURL, $wgMobileDomain ) !== false
) {
+ global $wgMobileDomain;
+ $xDevice = isset( $_SERVER['HTTP_X_DEVICE'] ) ?
$_SERVER['HTTP_X_DEVICE'] : '';
+ if ( $xDevice ) {
$parsedUrl = wfParseUrl( $redirect );
if ( stristr( $parsedUrl['host'],
$wgMobileDomain ) === false ) {
$hostParts = explode( '.',
$parsedUrl['host'] );
@@ -1331,6 +1331,10 @@
}
$ptAnonLogin = $this->doc->getElementById(
'pt-anonlogin' );
+
+ if ( !$ptAnonLogin ) {
+ $ptAnonLogin = $this->doc->getElementById(
'pt-login' );
+ }
if ( $ptAnonLogin ) {
$ptAnonLoginLink = $ptAnonLogin->firstChild;
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs