r108180 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108179‎ | r108180 | r108181 >
Date:22:18, 5 January 2012
Author:preilly
Status:ok
Tags:
Comment:
small fix for iphone application vary support — making change directly
Modified paths:
  • /branches/wmf/1.18wmf1/extensions/MobileFrontend/MobileFrontend.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/extensions/MobileFrontend/MobileFrontend.php
@@ -791,15 +791,14 @@
792792 private function sendApplicationVersionVaryHeader() {
793793 global $wgOut, $wgRequest;
794794 wfProfileIn( __METHOD__ );
 795+ $wgOut->addVaryHeader( 'Application_Version' );
795796 if ( isset( $_SERVER['HTTP_APPLICATION_VERSION'] ) ) {
796 - $wgRequest->response()->header( 'Application_Version: ' . $_SERVER['HTTP_APPLICATION_VERSION'] );
797 - $wgOut->addVaryHeader( 'Application_Version' );
 797+ $wgRequest->response()->header( 'Application_Version: ' . $_SERVER['HTTP_APPLICATION_VERSION'] );
798798 } else {
799799 if ( isset( $_SERVER['HTTP_X_DEVICE'] ) ) {
800800 if ( stripos( $_SERVER['HTTP_X_DEVICE'], 'iphone' ) !== false ||
801801 stripos( $_SERVER['HTTP_X_DEVICE'], 'android' ) !== false ) {
802802 $wgRequest->response()->header( 'Application_Version: ' . $_SERVER['HTTP_X_DEVICE'] );
803 - $wgOut->addVaryHeader( 'Application_Version' );
804803 }
805804 }
806805 }

Status & tagging log