http://www.mediawiki.org/wiki/Special:Code/MediaWiki/96027
Revision: 96027
Author: preilly
Date: 2011-09-01 19:11:50 +0000 (Thu, 01 Sep 2011)
Log Message:
-----------
fix the workaround trunk and deployment differences
Modified Paths:
--------------
trunk/extensions/MobileFrontend/MobileFrontend.php
Modified: trunk/extensions/MobileFrontend/MobileFrontend.php
===================================================================
--- trunk/extensions/MobileFrontend/MobileFrontend.php 2011-09-01 18:55:19 UTC
(rev 96026)
+++ trunk/extensions/MobileFrontend/MobileFrontend.php 2011-09-01 19:11:50 UTC
(rev 96027)
@@ -265,8 +265,9 @@
if ( self::$disableImages == 1 ) {
$wgRequest->response()->setcookie( 'disableImages', 1 );
- $location = str_replace('?disableImages=1', '',
str_replace( '&disableImages=1', '', $wgRequest->appendQuery('mfi=0') ) );
- $wgRequest->response()->header( 'Location: ' .
$location );
+ $location = str_replace( '?disableImages=1', '',
str_replace( '&disableImages=1', '', $wgRequest->getFullRequestURL() ) );
+ $location = str_replace( '&mfi=1', '', str_replace(
'&mfi=0', '', $location ) );
+ $wgRequest->response()->header( 'Location: ' .
$location . '&mfi=0' );
}
if ( self::$disableImages == 0 ) {
@@ -281,8 +282,9 @@
if ( $disableImages ) {
$wgRequest->response()->setcookie(
'disableImages', '' );
}
- $location = str_replace( '?enableImages=1', '',
str_replace( '&enableImages=1', '', $wgRequest->appendQuery('mfi=1') ) );
- $wgRequest->response()->header( 'Location: ' .
$location );
+ $location = str_replace( '?enableImages=1', '',
str_replace( '&enableImages=1', '', $wgRequest->getFullRequestURL() ) );
+ $location = str_replace( '&mfi=1', '', str_replace(
'&mfi=0', '', $location ) );
+ $wgRequest->response()->header( 'Location: ' .
$location . '&mfi=1' );
}
self::$useFormat = $wgRequest->getText( 'useformat' );
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs