From: Alexandre Emsenhuber Date: Tue, 8 Nov 2011 16:06:59 +0000 (+0000) Subject: Use the local context instead of $wgOut, now that we have one X-Git-Tag: 1.31.0-rc.0~26642 X-Git-Url: http://git.cyclocoop.org//%27http:/code.google.com/p/ie7-js//%27?a=commitdiff_plain;h=dff6f25d5ddd3d4147a3c6a478359729b5ca0282;p=lhc%2Fweb%2Fwiklou.git Use the local context instead of $wgOut, now that we have one --- diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index 880d884987..ebfa836ab3 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -404,7 +404,7 @@ class ApiMain extends ApiBase { } protected function sendCacheHeaders() { - global $wgUseXVO, $wgOut, $wgVaryOnXFP; + global $wgUseXVO, $wgVaryOnXFP; $response = $this->getRequest()->response(); if ( $this->mCacheMode == 'private' ) { @@ -416,11 +416,12 @@ class ApiMain extends ApiBase { $xfp = $wgVaryOnXFP ? ', X-Forwarded-Proto' : ''; $response->header( 'Vary: Accept-Encoding, Cookie' . $xfp ); if ( $wgUseXVO ) { + $out = $this->getOutput(); if ( $wgVaryOnXFP ) { - $wgOut->addVaryHeader( 'X-Forwarded-Proto' ); + $out->addVaryHeader( 'X-Forwarded-Proto' ); } - $response->header( $wgOut->getXVO() ); - if ( $wgOut->haveCacheVaryCookies() ) { + $response->header( $out->getXVO() ); + if ( $out->haveCacheVaryCookies() ) { // Logged in, mark this request private $response->header( 'Cache-Control: private' ); return;