From: Tim Starling Date: Tue, 22 May 2012 23:37:53 +0000 (+1000) Subject: Remove OutputPage::uncacheableBecauseRequestvars() X-Git-Tag: 1.31.0-rc.0~23527 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/ajouter.php?a=commitdiff_plain;h=92c7c6f4264d01f84c059f73d597d2f2137a4cfd;p=lhc%2Fweb%2Fwiklou.git Remove OutputPage::uncacheableBecauseRequestvars() Fix for r10265: OutputPage::uncacheableBecauseRequestvars() as written in that revision is backwards, apparently declaring all requests to be uncacheable except those with useskin or uselang. Luckily getText() has always converted its default parameter to a string, so the triple-equals comparisons always fail, and uncacheableBecauseRequestvars() always returns false. In any case, it was never necessary to suppress the client-side cache for useskin/uselang views, so the accidental behaviour was appropriate. Change-Id: I520940867509b986a47d63ead9b549e8aa82fa1f --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index b1bd14a576..ad4e4ef6d2 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1682,18 +1682,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 @@ -1861,7 +1849,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()