From d8f46cf22517b298df92e5eab09a82fcb1df77a3 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 9 Oct 2006 02:36:16 +0000 Subject: [PATCH] * (bug 6600) Update article counts on XML import --- RELEASE-NOTES | 1 + includes/SpecialImport.php | 15 ++++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 9984a2f5bb..2a3ced8ab1 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -276,6 +276,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Replaced {{SERVER}}{{localurl:xxx}} with {{fullurl:xxx}} in localisation files * Fix regression in Special:Watchlist text header * (bug 7510) Update article counts etc on undelete +* (bug 6600) Update article counts on XML import == Languages updated == diff --git a/includes/SpecialImport.php b/includes/SpecialImport.php index fa0ee7e69a..aaadb662b6 100644 --- a/includes/SpecialImport.php +++ b/includes/SpecialImport.php @@ -363,13 +363,14 @@ class WikiRevision { if( $created ) { wfDebug( __METHOD__ . ": running onArticleCreate\n" ); Article::onArticleCreate( $this->title ); - } else { - if( $changed ) { - wfDebug( __METHOD__ . ": running onArticleEdit\n" ); - Article::onArticleEdit( $this->title ); - } - } - if( $created || $changed ) { + + wfDebug( __METHOD__ . ": running create updates\n" ); + $article->createUpdates( $revision ); + + } elseif( $changed ) { + wfDebug( __METHOD__ . ": running onArticleEdit\n" ); + Article::onArticleEdit( $this->title ); + wfDebug( __METHOD__ . ": running edit updates\n" ); $article->editUpdates( $this->getText(), -- 2.20.1