print "<pre>\n";
chdir( ".." );
flush();
-
-
- # Add missing tables
- foreach ( $wgNewTables as $tableRecord ) {
- add_table( $tableRecord[0], $tableRecord[1] );
- flush();
- }
-
- # Add missing fields
- foreach ( $wgNewFields as $fieldRecord ) {
- add_table( $fieldRecord[0], $fieldRecord[1], $fieldRecord[2] );
- flush();
- }
-
- # Do schema updates which require special handling
- do_interwiki_update(); flush();
- do_index_update(); flush();
- do_linkscc_1_3_update(); flush();
- convertLinks(); flush();
- do_image_name_unique_update(); flush();
-
- if ( isTemplateInitialised() ) {
- print "Template namespace already initialised\n";
- } else {
- moveCustomMessages( 1 ); flush();
- moveCustomMessages( 2 ); flush();
- moveCustomMessages( 3 ); flush();
- }
-
- initialiseMessages(); flush();
+ do_all_updates();
chdir( "config" );
print "</pre>\n";
<?php
$list = getLanguageList();
foreach( $list as $code => $name ) {
- $sel = ($code == $conf->LanguageCode) ? "selected" : "";
+ $sel = ($code == $conf->LanguageCode) ? 'selected="selected"' : '';
echo "\t\t<option value=\"$code\" $sel>$name</option>\n";
}
?>
--- /dev/null
+<?php
+/**
+ * Run all updaters.
+ *
+ * @todo document
+ * @package MediaWiki
+ * @subpackage Maintenance
+ */
+
+/** */
+require_once( "commandLine.inc" );
+require_once( "updaters.inc" );
+$wgTitle = Title::newFromText( "MediaWiki database updater" );
+$wgDatabase = Database::newFromParams( $wgDBserver, $wgDBadminuser, $wgDBadminpassword, $wgDBname );
+
+do_all_updates();
+
+print "Done.\n";
+
+?>
/** */
+require_once 'convertLinks.inc';
+require_once 'InitialiseMessages.inc';
+require_once 'archives/moveCustomMessages.inc';
+
$wgNewTables = array(
# table patch file (in maintenance/archives)
array( 'linkscc', 'patch-linkscc.sql' ),
}
}
+function do_all_updates() {
+ global $wgNewTables, $wgNewFields;
+
+ # Add missing tables
+ foreach ( $wgNewTables as $tableRecord ) {
+ add_table( $tableRecord[0], $tableRecord[1] );
+ flush();
+ }
+
+ # Add missing fields
+ foreach ( $wgNewFields as $fieldRecord ) {
+ add_table( $fieldRecord[0], $fieldRecord[1], $fieldRecord[2] );
+ flush();
+ }
+
+ # Do schema updates which require special handling
+ do_interwiki_update(); flush();
+ do_index_update(); flush();
+ do_linkscc_1_3_update(); flush();
+ convertLinks(); flush();
+ do_image_name_unique_update(); flush();
+
+ if ( isTemplateInitialised() ) {
+ print "Template namespace already initialised\n";
+ } else {
+ moveCustomMessages( 1 ); flush();
+ moveCustomMessages( 2 ); flush();
+ moveCustomMessages( 3 ); flush();
+ }
+
+ initialiseMessages(); flush();
+}
+
?>