From: Max Semenik Date: Wed, 30 Mar 2011 17:32:20 +0000 (+0000) Subject: (bug 28237) Installer doesn't create extension tables X-Git-Tag: 1.31.0-rc.0~31127 X-Git-Url: http://git.cyclocoop.org/%22%20.%20%20%20%24self2%20.%20%20%20%22&var_mode_affiche=boucle?a=commitdiff_plain;h=7966eae6e6b02e3aeb16809d27b1724a68e573ca;p=lhc%2Fweb%2Fwiklou.git (bug 28237) Installer doesn't create extension tables --- diff --git a/includes/installer/DatabaseInstaller.php b/includes/installer/DatabaseInstaller.php index 9e8d05cc6f..3594f350d6 100644 --- a/includes/installer/DatabaseInstaller.php +++ b/includes/installer/DatabaseInstaller.php @@ -202,6 +202,10 @@ abstract class DatabaseInstaller { } } } + + // Now run updates to create tables for old extensions + $updater->doUpdates( array( 'extensions' ) ); + return $status; } diff --git a/includes/installer/DatabaseUpdater.php b/includes/installer/DatabaseUpdater.php index abcea3309b..ad39bee41e 100644 --- a/includes/installer/DatabaseUpdater.php +++ b/includes/installer/DatabaseUpdater.php @@ -189,21 +189,29 @@ abstract class DatabaseUpdater { /** * Do all the updates * + * @param $what Array: what updates to perform * @param $purge Boolean: whether to clear the objectcache table after updates */ - public function doUpdates( $purge = true ) { + public function doUpdates( $what = array( 'core', 'extensions', 'purge' ) ) { global $wgVersion; - $this->runUpdates( $this->getCoreUpdateList(), false ); - $this->runUpdates( $this->getOldGlobalUpdates(), false ); - $this->runUpdates( $this->getExtensionUpdates(), true ); + $what = array_flip( $what ); + if ( isset( $what['core'] ) ) { + $this->runUpdates( $this->getCoreUpdateList(), false ); + } + if ( isset( $what['extensions'] ) ) { + $this->runUpdates( $this->getOldGlobalUpdates(), false ); + $this->runUpdates( $this->getExtensionUpdates(), true ); + } $this->setAppliedUpdates( $wgVersion, $this->updates ); - if( $purge ) { + if( isset( $what['purge'] ) ) { $this->purgeCache(); } - $this->checkStats(); + if ( isset( $what['core'] ) ) { + $this->checkStats(); + } } /** diff --git a/includes/installer/OracleUpdater.php b/includes/installer/OracleUpdater.php index cb41e8e9bd..331c79808e 100644 --- a/includes/installer/OracleUpdater.php +++ b/includes/installer/OracleUpdater.php @@ -83,8 +83,8 @@ class OracleUpdater extends DatabaseUpdater { /** * Overload: after this action field info table has to be rebuilt */ - public function doUpdates( $purge = true ) { - parent::doUpdates(); + public function doUpdates( $what = array( 'core', 'extensions', 'purge' ) ) { + parent::doUpdates( $what ); $this->db->query( 'BEGIN fill_wiki_info; END;' ); } diff --git a/includes/installer/WebInstallerPage.php b/includes/installer/WebInstallerPage.php index 38b12d5589..1d3daf2892 100644 --- a/includes/installer/WebInstallerPage.php +++ b/includes/installer/WebInstallerPage.php @@ -114,6 +114,27 @@ abstract class WebInstallerPage { protected function getFieldsetEnd() { return "\n"; } + + /** + * Opens a textarea used to display the progress of a long operation + */ + protected function startLiveBox() { + $this->addHTML( + '' . + '' . + ' +' ); + $this->parent->output->flush(); + } } class WebInstaller_Language extends WebInstallerPage { @@ -464,16 +485,11 @@ class WebInstaller_Upgrade extends WebInstallerPage { if ( $this->parent->request->wasPosted() ) { $installer->preUpgrade(); - $this->addHTML( - '' . - '' . - ' -' ); - $this->parent->output->flush(); + $this->endLiveBox(); + if ( $result ) { // If they're going to possibly regenerate LocalSettings, we // need to create the upgrade/secret keys. Bug 26481 @@ -1081,9 +1097,15 @@ class WebInstaller_Install extends WebInstallerPage { public function startStage( $step ) { $this->addHTML( "
  • " . wfMsgHtml( "config-install-$step" ) . wfMsg( 'ellipsis') ); + if ( $step == 'extension-tables' ) { + $this->startLiveBox(); + } } public function endStage( $step, $status ) { + if ( $step == 'extension-tables' ) { + $this->endLiveBox(); + } $msg = $status->isOk() ? 'config-install-step-done' : 'config-install-step-failed'; $html = wfMsgHtml( 'word-separator' ) . wfMsgHtml( $msg ); if ( !$status->isOk() ) {