Index: trunk/extensions/MobileFrontend/MobileFrontend.php |
— | — | @@ -423,9 +423,9 @@ |
424 | 424 | |
425 | 425 | public function beforePageRedirect( $out, &$redirect, &$code ) { |
426 | 426 | 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 ) { |
430 | 430 | $parsedUrl = wfParseUrl( $redirect ); |
431 | 431 | if ( stristr( $parsedUrl['host'], $wgMobileDomain ) === false ) { |
432 | 432 | $hostParts = explode( '.', $parsedUrl['host'] ); |