Be sure that MW_NO_SETUP is defined before executing updates, this is not always...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Fri, 1 Oct 2010 20:56:39 +0000 (20:56 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Fri, 1 Oct 2010 20:56:39 +0000 (20:56 +0000)
config/Installer.php
includes/installer/DatabaseUpdater.php

index 9d8855c..165740d 100644 (file)
@@ -1234,7 +1234,6 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) {
                        chdir( ".." );
                        flush();
 
-                       define( 'MW_NO_SETUP', true );
                        $updater = DatabaseUpdater::newForDb( $wgDatabase, false );
                        $updater->doUpdates();
                        foreach( $updater->getPostDatabaseUpdateMaintenance() as $maint ) {
index 70bacfe..8a32808 100644 (file)
@@ -132,6 +132,10 @@ abstract class DatabaseUpdater {
        public function doUpdates( $purge = true ) {
                global $wgVersion;
 
+               if ( !defined( 'MW_NO_SETUP' ) ) {
+                       define( 'MW_NO_SETUP', true );
+               }
+
                $this->runUpdates( $this->getCoreUpdateList(), false );
                $this->runUpdates( $this->getOldGlobalUpdates(), false );
                $this->runUpdates( $this->getExtensionUpdates(), true );