Don't use vague boolean
authorAaron Schulz <aaron@users.mediawiki.org>
Mon, 13 Oct 2008 06:02:32 +0000 (06:02 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Mon, 13 Oct 2008 06:02:32 +0000 (06:02 +0000)
includes/Article.php
includes/Import.php

index 159ce7b..a71f1a9 100644 (file)
@@ -1593,8 +1593,8 @@ class Article {
                        }
 
                        # Invalidate cache of this article and all pages using this article
-                       # as a template. Partly deferred.
-                       Article::onArticleEdit( $this->mTitle, false ); // leave templatelinks for editUpdates()
+                       # as a template. Partly deferred. Leave templatelinks for editUpdates().
+                       Article::onArticleEdit( $this->mTitle, 'skiptransclusions' );
                        # Update links tables, site stats, etc.
                        $this->editUpdates( $text, $summary, $isminor, $now, $revisionId, $changed );
                } else {
@@ -3239,11 +3239,11 @@ class Article {
        /**
         * Purge caches on page update etc
         */
-       public static function onArticleEdit( $title, $touchTemplates = true ) {
+       public static function onArticleEdit( $title, $transclusions = 'transclusions' ) {
                global $wgDeferredUpdateList, $wgUseFileCache;
 
                // Invalidate caches of articles which include this page
-               if( $touchTemplates )
+               if( $transclusions !== 'skiptransclusions' )
                        $wgDeferredUpdateList[] = new HTMLCacheUpdate( $title, 'templatelinks' );
 
                // Invalidate the caches of all pages which redirect here
index b8db934..7bd44fa 100644 (file)
@@ -219,7 +219,7 @@ class WikiRevision {
 
                } elseif( $changed ) {
                        wfDebug( __METHOD__ . ": running onArticleEdit\n" );
-                       Article::onArticleEdit( $this->title, false ); // leave templatelinks for editUpdates()
+                       Article::onArticleEdit( $this->title, 'skiptransclusions' ); // leave templatelinks for editUpdates()
 
                        wfDebug( __METHOD__ . ": running edit updates\n" );
                        $article->editUpdates(