From 7d32520e7c8a128a39ee6fbe46544b1a414a9788 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Fri, 1 Oct 2010 20:56:39 +0000 Subject: [PATCH] Be sure that MW_NO_SETUP is defined before executing updates, this is not always defined at that point --- config/Installer.php | 1 - includes/installer/DatabaseUpdater.php | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) 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 ); -- 2.20.1