Index: trunk/phase3/includes/installer/DatabaseUpdater.php |
— | — | @@ -189,21 +189,29 @@ |
190 | 190 | /** |
191 | 191 | * Do all the updates |
192 | 192 | * |
| 193 | + * @param $what Array: what updates to perform |
193 | 194 | * @param $purge Boolean: whether to clear the objectcache table after updates |
194 | 195 | */ |
195 | | - public function doUpdates( $purge = true ) { |
| 196 | + public function doUpdates( $what = array( 'core', 'extensions', 'purge' ) ) { |
196 | 197 | global $wgVersion; |
197 | 198 | |
198 | | - $this->runUpdates( $this->getCoreUpdateList(), false ); |
199 | | - $this->runUpdates( $this->getOldGlobalUpdates(), false ); |
200 | | - $this->runUpdates( $this->getExtensionUpdates(), true ); |
| 199 | + $what = array_flip( $what ); |
| 200 | + if ( isset( $what['core'] ) ) { |
| 201 | + $this->runUpdates( $this->getCoreUpdateList(), false ); |
| 202 | + } |
| 203 | + if ( isset( $what['extensions'] ) ) { |
| 204 | + $this->runUpdates( $this->getOldGlobalUpdates(), false ); |
| 205 | + $this->runUpdates( $this->getExtensionUpdates(), true ); |
| 206 | + } |
201 | 207 | |
202 | 208 | $this->setAppliedUpdates( $wgVersion, $this->updates ); |
203 | 209 | |
204 | | - if( $purge ) { |
| 210 | + if( isset( $what['purge'] ) ) { |
205 | 211 | $this->purgeCache(); |
206 | 212 | } |
207 | | - $this->checkStats(); |
| 213 | + if ( isset( $what['core'] ) ) { |
| 214 | + $this->checkStats(); |
| 215 | + } |
208 | 216 | } |
209 | 217 | |
210 | 218 | /** |
Index: trunk/phase3/includes/installer/OracleUpdater.php |
— | — | @@ -83,8 +83,8 @@ |
84 | 84 | /** |
85 | 85 | * Overload: after this action field info table has to be rebuilt |
86 | 86 | */ |
87 | | - public function doUpdates( $purge = true ) { |
88 | | - parent::doUpdates(); |
| 87 | + public function doUpdates( $what = array( 'core', 'extensions', 'purge' ) ) { |
| 88 | + parent::doUpdates( $what ); |
89 | 89 | |
90 | 90 | $this->db->query( 'BEGIN fill_wiki_info; END;' ); |
91 | 91 | } |
Index: trunk/phase3/includes/installer/DatabaseInstaller.php |
— | — | @@ -202,6 +202,10 @@ |
203 | 203 | } |
204 | 204 | } |
205 | 205 | } |
| 206 | + |
| 207 | + // Now run updates to create tables for old extensions |
| 208 | + $updater->doUpdates( array( 'extensions' ) ); |
| 209 | + |
206 | 210 | return $status; |
207 | 211 | } |
208 | 212 | |
Index: trunk/phase3/includes/installer/WebInstallerPage.php |
— | — | @@ -114,6 +114,27 @@ |
115 | 115 | protected function getFieldsetEnd() { |
116 | 116 | return "</fieldset>\n"; |
117 | 117 | } |
| 118 | + |
| 119 | + /** |
| 120 | + * Opens a textarea used to display the progress of a long operation |
| 121 | + */ |
| 122 | + protected function startLiveBox() { |
| 123 | + $this->addHTML( |
| 124 | + '<div id="config-spinner" style="display:none;"><img src="../skins/common/images/ajax-loader.gif" /></div>' . |
| 125 | + '<script>jQuery( "#config-spinner" ).show();</script>' . |
| 126 | + '<textarea id="config-live-log" name="LiveLog" rows="10" cols="30" readonly="readonly">' |
| 127 | + ); |
| 128 | + $this->parent->output->flush(); |
| 129 | + } |
| 130 | + |
| 131 | + /** |
| 132 | + * Opposite to startLiveBox() |
| 133 | + */ |
| 134 | + protected function endLiveBox() { |
| 135 | + $this->addHTML( '</textarea> |
| 136 | +<script>jQuery( "#config-spinner" ).hide()</script>' ); |
| 137 | + $this->parent->output->flush(); |
| 138 | + } |
118 | 139 | } |
119 | 140 | |
120 | 141 | class WebInstaller_Language extends WebInstallerPage { |
— | — | @@ -464,16 +485,11 @@ |
465 | 486 | |
466 | 487 | if ( $this->parent->request->wasPosted() ) { |
467 | 488 | $installer->preUpgrade(); |
468 | | - $this->addHTML( |
469 | | - '<div id="config-spinner" style="display:none;"><img src="../skins/common/images/ajax-loader.gif" /></div>' . |
470 | | - '<script>jQuery( "#config-spinner" ).show();</script>' . |
471 | | - '<textarea id="config-update-log" name="UpdateLog" rows="10" readonly="readonly">' |
472 | | - ); |
473 | | - $this->parent->output->flush(); |
| 489 | + |
| 490 | + $this->startLiveBox(); |
474 | 491 | $result = $installer->doUpgrade(); |
475 | | - $this->addHTML( '</textarea> |
476 | | -<script>jQuery( "#config-spinner" ).hide()</script>' ); |
477 | | - $this->parent->output->flush(); |
| 492 | + $this->endLiveBox(); |
| 493 | + |
478 | 494 | if ( $result ) { |
479 | 495 | // If they're going to possibly regenerate LocalSettings, we |
480 | 496 | // need to create the upgrade/secret keys. Bug 26481 |
— | — | @@ -1081,9 +1097,15 @@ |
1082 | 1098 | |
1083 | 1099 | public function startStage( $step ) { |
1084 | 1100 | $this->addHTML( "<li>" . wfMsgHtml( "config-install-$step" ) . wfMsg( 'ellipsis') ); |
| 1101 | + if ( $step == 'extension-tables' ) { |
| 1102 | + $this->startLiveBox(); |
| 1103 | + } |
1085 | 1104 | } |
1086 | 1105 | |
1087 | 1106 | public function endStage( $step, $status ) { |
| 1107 | + if ( $step == 'extension-tables' ) { |
| 1108 | + $this->endLiveBox(); |
| 1109 | + } |
1088 | 1110 | $msg = $status->isOk() ? 'config-install-step-done' : 'config-install-step-failed'; |
1089 | 1111 | $html = wfMsgHtml( 'word-separator' ) . wfMsgHtml( $msg ); |
1090 | 1112 | if ( !$status->isOk() ) { |