X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FOutputPage.php;h=35b2f385802c5ea77f639be806cf6b8fc7fd6660;hb=bbffc62c58972a34ee617ce135e37ec936272341;hp=b1bd14a5761a2d9331ce7c6834a5117c7d5a07ff;hpb=ad8b234b1bf30dc342284b1a8fc39a4b27ce0840;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/OutputPage.php b/includes/OutputPage.php index b1bd14a576..35b2f38580 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -20,10 +20,6 @@ * @file */ -if ( !defined( 'MEDIAWIKI' ) ) { - die( 1 ); -} - /** * This class should be covered by a general architecture document which does * not exist as of January 2011. This is one of the Core classes and should @@ -1682,18 +1678,6 @@ class OutputPage extends ContextSource { return $cookies; } - /** - * Return whether this page is not cacheable because "useskin" or "uselang" - * URL parameters were passed. - * - * @return Boolean - */ - function uncacheableBecauseRequestVars() { - $request = $this->getRequest(); - return $request->getText( 'useskin', false ) === false - && $request->getText( 'uselang', false ) === false; - } - /** * Check if the request has a cache-varying cookie header * If it does, it's very important that we don't allow public caching @@ -1755,7 +1739,7 @@ class OutputPage extends ContextSource { $headers = array(); foreach( $this->mVaryHeader as $header => $option ) { $newheader = $header; - if( is_array( $option ) ) { + if ( is_array( $option ) && count( $option ) > 0 ) { $newheader .= ';' . implode( ';', $option ); } $headers[] = $newheader; @@ -1861,7 +1845,7 @@ class OutputPage extends ContextSource { $response->header( $this->getXVO() ); } - if( !$this->uncacheableBecauseRequestVars() && $this->mEnableClientCache ) { + if( $this->mEnableClientCache ) { if( $wgUseSquid && session_id() == '' && !$this->isPrintable() && $this->mSquidMaxage != 0 && !$this->haveCacheVaryCookies()