Same for the getPostDatabaseUpdateMaintenance
authorSam Reed <reedy@users.mediawiki.org>
Fri, 11 Nov 2011 17:06:03 +0000 (17:06 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Fri, 11 Nov 2011 17:06:03 +0000 (17:06 +0000)
We only need to run them once

maintenance/update.php

index b0901ba..c4bf3b2 100644 (file)
@@ -88,7 +88,7 @@ class UpdateMediaWiki extends Maintenance {
                $wgTitle = Title::newFromText( "MediaWiki database updater" );
 
                $this->output( "MediaWiki {$wgVersion} Updater\n\n" );
-               
+
                wfWaitForSlaves( 5 ); // let's not kill databases, shall we? ;) --tor
 
                if ( !$this->hasOption( 'skip-compat-checks' ) ) {
@@ -121,8 +121,12 @@ class UpdateMediaWiki extends Maintenance {
                $updater->doUpdates( $updates );
 
                foreach( $updater->getPostDatabaseUpdateMaintenance() as $maint ) {
+                       if ( $updater->updateRowExists( $maint ) ) {
+                               continue;
+                       }
                        $child = $this->runChild( $maint );
                        $child->execute();
+                       $updater->insertUpdateRow( $maint );
                }
 
                $this->output( "\nDone.\n" );