r44362 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44361‎ | r44362 | r44363 >
Date:21:40, 9 December 2008
Author:aaron
Status:ok
Tags:
Comment:
Allow curid for filecache
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -2953,9 +2953,8 @@
29542954 }
29552955 $called = true;
29562956 if( $this->isFileCacheable() ) {
2957 - $touched = $this->mTouched;
29582957 $cache = new HTMLFileCache( $this->mTitle );
2959 - if( $cache->isFileCacheGood( $touched ) ) {
 2958+ if( $cache->isFileCacheGood( $this->mTouched ) ) {
29602959 wfDebug( "Article::tryFileCache(): about to load file\n" );
29612960 $cache->loadFromFileCache();
29622961 return true;
@@ -2978,9 +2977,8 @@
29792978 // Get all query values
29802979 $queryVals = $wgRequest->getValues();
29812980 foreach( $queryVals as $query => $val ) {
2982 - if( $query == 'title' || ($query == 'action' && $val == 'view') ) {
2983 - // Normal page view in query form
2984 - } else {
 2981+ // Normal page view in query form can have action=view
 2982+ if( $query !== 'title' && $query !== 'curid' && !($query == 'action' && $val == 'view') ) {
29852983 return false;
29862984 }
29872985 }
@@ -2990,12 +2988,12 @@
29912989 $clang = $wgContLang->getCode();
29922990
29932991 $cacheable = $wgUseFileCache
2994 - && (!$wgShowIPinHeader)
2995 - && ($this->getID() > 0)
2996 - && ($wgUser->isAnon())
2997 - && (!$wgUser->getNewtalk())
2998 - && (!$this->mRedirectedFrom)
2999 - && ($ulang === $clang);
 2992+ && !$wgShowIPinHeader
 2993+ && $this->getID() > 0
 2994+ && $wgUser->isAnon()
 2995+ && !$wgUser->getNewtalk()
 2996+ && !$this->mRedirectedFrom
 2997+ && $ulang === $clang;
30002998 // Extension may have reason to disable file caching on some pages.
30012999 if( $cacheable ) {
30023000 $cacheable = wfRunHooks( 'IsFileCacheable', array( &$this ) );

Status & tagging log