From: Alexandre Emsenhuber Date: Fri, 1 Oct 2010 20:56:39 +0000 (+0000) Subject: Be sure that MW_NO_SETUP is defined before executing updates, this is not always... X-Git-Tag: 1.31.0-rc.0~34698 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=7d32520e7c8a128a39ee6fbe46544b1a414a9788;p=lhc%2Fweb%2Fwiklou.git Be sure that MW_NO_SETUP is defined before executing updates, this is not always defined at that point --- diff --git a/config/Installer.php b/config/Installer.php index 9d8855cb42..165740d17b 100644 --- a/config/Installer.php +++ b/config/Installer.php @@ -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 ) { diff --git a/includes/installer/DatabaseUpdater.php b/includes/installer/DatabaseUpdater.php index 70bacfe167..8a32808eb0 100644 --- a/includes/installer/DatabaseUpdater.php +++ b/includes/installer/DatabaseUpdater.php @@ -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 );