r42017 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r42016‎ | r42017 | r42018 >
Date:06:02, 13 October 2008
Author:aaron
Status:old
Tags:
Comment:
Don't use vague boolean
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/includes/Import.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -1593,8 +1593,8 @@
15941594 }
15951595
15961596 # Invalidate cache of this article and all pages using this article
1597 - # as a template. Partly deferred.
1598 - Article::onArticleEdit( $this->mTitle, false ); // leave templatelinks for editUpdates()
 1597+ # as a template. Partly deferred. Leave templatelinks for editUpdates().
 1598+ Article::onArticleEdit( $this->mTitle, 'skiptransclusions' );
15991599 # Update links tables, site stats, etc.
16001600 $this->editUpdates( $text, $summary, $isminor, $now, $revisionId, $changed );
16011601 } else {
@@ -3239,11 +3239,11 @@
32403240 /**
32413241 * Purge caches on page update etc
32423242 */
3243 - public static function onArticleEdit( $title, $touchTemplates = true ) {
 3243+ public static function onArticleEdit( $title, $transclusions = 'transclusions' ) {
32443244 global $wgDeferredUpdateList, $wgUseFileCache;
32453245
32463246 // Invalidate caches of articles which include this page
3247 - if( $touchTemplates )
 3247+ if( $transclusions !== 'skiptransclusions' )
32483248 $wgDeferredUpdateList[] = new HTMLCacheUpdate( $title, 'templatelinks' );
32493249
32503250 // Invalidate the caches of all pages which redirect here
Index: trunk/phase3/includes/Import.php
@@ -219,7 +219,7 @@
220220
221221 } elseif( $changed ) {
222222 wfDebug( __METHOD__ . ": running onArticleEdit\n" );
223 - Article::onArticleEdit( $this->title, false ); // leave templatelinks for editUpdates()
 223+ Article::onArticleEdit( $this->title, 'skiptransclusions' ); // leave templatelinks for editUpdates()
224224
225225 wfDebug( __METHOD__ . ": running edit updates\n" );
226226 $article->editUpdates(

Status & tagging log