http://www.mediawiki.org/wiki/Special:Code/MediaWiki/96028

Revision: 96028
Author:   preilly
Date:     2011-09-01 19:12:33 +0000 (Thu, 01 Sep 2011)
Log Message:
-----------
mft r96027

Modified Paths:
--------------
    branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php

Modified: branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php
===================================================================
--- branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php  
2011-09-01 19:11:50 UTC (rev 96027)
+++ branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php  
2011-09-01 19:12:33 UTC (rev 96028)
@@ -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

Reply via email to