Allow curid for filecache
authorAaron Schulz <aaron@users.mediawiki.org>
Tue, 9 Dec 2008 21:40:06 +0000 (21:40 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Tue, 9 Dec 2008 21:40:06 +0000 (21:40 +0000)
includes/Article.php

index 07fce76..dcb58db 100644 (file)
@@ -2953,9 +2953,8 @@ class Article {
                }
                $called = true;
                if( $this->isFileCacheable() ) {
-                       $touched = $this->mTouched;
                        $cache = new HTMLFileCache( $this->mTitle );
-                       if( $cache->isFileCacheGood( $touched ) ) {
+                       if( $cache->isFileCacheGood( $this->mTouched ) ) {
                                wfDebug( "Article::tryFileCache(): about to load file\n" );
                                $cache->loadFromFileCache();
                                return true;
@@ -2978,9 +2977,8 @@ class Article {
                // Get all query values
                $queryVals = $wgRequest->getValues();
                foreach( $queryVals as $query => $val ) {
-                       if( $query == 'title' || ($query == 'action' && $val == 'view') ) {
-                               // Normal page view in query form
-                       } else {
+                       // Normal page view in query form can have action=view
+                       if( $query !== 'title' && $query !== 'curid' && !($query == 'action' && $val == 'view') ) {
                                return false;
                        }
                }
@@ -2990,12 +2988,12 @@ class Article {
                $clang = $wgContLang->getCode();
 
                $cacheable = $wgUseFileCache
-                       && (!$wgShowIPinHeader)
-                       && ($this->getID() > 0)
-                       && ($wgUser->isAnon())
-                       && (!$wgUser->getNewtalk())
-                       && (!$this->mRedirectedFrom)
-                       && ($ulang === $clang);
+                       && !$wgShowIPinHeader
+                       && $this->getID() > 0
+                       && $wgUser->isAnon()
+                       && !$wgUser->getNewtalk()
+                       && !$this->mRedirectedFrom
+                       && $ulang === $clang;
                // Extension may have reason to disable file caching on some pages.
                if( $cacheable ) {
                        $cacheable = wfRunHooks( 'IsFileCacheable', array( &$this ) );