r106291 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106290‎ | r106291 | r106292 >
Date:00:28, 15 December 2011
Author:preilly
Status:ok
Tags:
Comment:
1.18wmf1: MFT r106286 - 106290
Modified paths:
  • /branches/wmf/1.18wmf1/extensions/MobileFrontend/MobileFrontend.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/extensions/MobileFrontend/MobileFrontend.php
@@ -423,9 +423,9 @@
424424
425425 public function beforePageRedirect( $out, &$redirect, &$code ) {
426426 if ( $out->getTitle()->isSpecial( 'Userlogin' ) ) {
427 - global $wgMobileDomain, $wgRequest;
428 - $requestURL = $wgRequest->getFullRequestURL();
429 - if ( stristr( $requestURL, $wgMobileDomain ) !== false ) {
 427+ global $wgMobileDomain;
 428+ $xDevice = isset( $_SERVER['HTTP_X_DEVICE'] ) ? $_SERVER['HTTP_X_DEVICE'] : '';
 429+ if ( $xDevice ) {
430430 $parsedUrl = wfParseUrl( $redirect );
431431 if ( stristr( $parsedUrl['host'], $wgMobileDomain ) === false ) {
432432 $hostParts = explode( '.', $parsedUrl['host'] );
@@ -1331,6 +1331,10 @@
13321332 }
13331333
13341334 $ptAnonLogin = $this->doc->getElementById( 'pt-anonlogin' );
 1335+
 1336+ if ( !$ptAnonLogin ) {
 1337+ $ptAnonLogin = $this->doc->getElementById( 'pt-login' );
 1338+ }
13351339
13361340 if ( $ptAnonLogin ) {
13371341 $ptAnonLoginLink = $ptAnonLogin->firstChild;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r106286add pt-login casepreilly00:23, 15 December 2011

Status & tagging log