(bug 32508) Fix updater output
authorAntoine Musso <hashar@users.mediawiki.org>
Thu, 12 Jan 2012 10:59:13 +0000 (10:59 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Thu, 12 Jan 2012 10:59:13 +0000 (10:59 +0000)
site_stats updated is still a database action.
Purge cache is now the very last one.

Output:

<snip>
...site_stats is populated...done.
Purging caches...done.

Done.

includes/installer/DatabaseUpdater.php

index ef87483..ef8228d 100644 (file)
@@ -250,6 +250,10 @@ abstract class DatabaseUpdater {
 
                $this->setAppliedUpdates( $wgVersion, $this->updates );
 
+               if ( isset( $what['stats'] ) ) {
+                       $this->checkStats();
+               }
+
                if ( isset( $what['purge'] ) ) {
                        $this->purgeCache();
 
@@ -257,9 +261,6 @@ abstract class DatabaseUpdater {
                                $this->rebuildLocalisationCache();
                        }
                }
-               if ( isset( $what['stats'] ) ) {
-                       $this->checkStats();
-               }
        }
 
        /**
@@ -562,7 +563,7 @@ abstract class DatabaseUpdater {
         * Check the site_stats table is not properly populated.
         */
        protected function checkStats() {
-               $this->output( "Checking site_stats row..." );
+               $this->output( "...site_stats is populated..." );
                $row = $this->db->selectRow( 'site_stats', '*', array( 'ss_row_id' => 1 ), __METHOD__ );
                if ( $row === false ) {
                        $this->output( "data is missing! rebuilding...\n" );