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

Revision: 95047
Author:   preilly
Date:     2011-08-19 22:26:41 +0000 (Fri, 19 Aug 2011)
Log Message:
-----------
mft r95046

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-08-19 22:24:25 UTC (rev 95046)
+++ branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php  
2011-08-19 22:26:41 UTC (rev 95047)
@@ -65,7 +65,7 @@
 );
 
 class ExtMobileFrontend {
-       const VERSION = '0.5.41';
+       const VERSION = '0.5.42';
 
        /**
         * @var DOMDocument
@@ -378,19 +378,20 @@
        }
 
        private function disableCaching() {
+               global $wgRequest;
                if ( isset( $_SERVER['HTTP_VIA'] ) &&
                        stripos( $_SERVER['HTTP_VIA'], '.wikimedia.org:3128' ) 
!== false ) {
-                       header( 'Cache-Control: no-cache, must-revalidate' );
-                       header( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' );
-                       header( 'Pragma: no-cache' );
+                       $wgRequest->response()->header( 'Cache-Control: 
no-cache, must-revalidate' );
+                       $wgRequest->response()->header( 'Expires: Sat, 26 Jul 
1997 05:00:00 GMT' );
+                       $wgRequest->response()->header( 'Pragma: no-cache' );
                }
        }
        
        private function sendXDeviceVaryHeader() {
-               global $wgOut;
+               global $wgOut, $wgRequest;
                
                if ( !empty( $_SERVER['HTTP_X_DEVICE'] ) ) {
-                       header( 'X-Device: ' . $_SERVER['HTTP_X_DEVICE'] );
+                       $wgRequest->response()->header( 'X-Device: ' . 
$_SERVER['HTTP_X_DEVICE'] );
                        $wgOut->addVaryHeader( 'X-Device' );
                }
        }


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to