summaryrefslogtreecommitdiff
path: root/maintenance/rebuildMessages.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2008-12-15 18:02:47 +0100
committerPierre Schmitz <pierre@archlinux.de>2008-12-15 18:02:47 +0100
commit396b28f3d881f5debd888ba9bb9b47c2d478a76f (patch)
tree10d6e1a721ee4ef69def34a57f02d7eb3fc9e31e /maintenance/rebuildMessages.php
parent0be4d3ccf6c4fe98a72704f9463ecdea2ee5e615 (diff)
update to Mediawiki 1.13.3; some cleanups
Diffstat (limited to 'maintenance/rebuildMessages.php')
-rw-r--r--maintenance/rebuildMessages.php66
1 files changed, 0 insertions, 66 deletions
diff --git a/maintenance/rebuildMessages.php b/maintenance/rebuildMessages.php
deleted file mode 100644
index d009098d..00000000
--- a/maintenance/rebuildMessages.php
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-/**
- * @todo document
- * @package MediaWiki
- * @subpackage Maintenance
- */
-
-/** */
-$options = array( 'update' => null, 'rebuild' => null );
-require_once( "commandLine.inc" );
-include_once( "InitialiseMessages.inc" );
-
-$wgTitle = Title::newFromText( "Rebuild messages script" );
-
-if ( isset( $args[0] ) ) {
- # Retain script compatibility
- $response = array_shift( $args );
- if ( $response == "update" ) {
- $response = 1;
- } elseif ( $response == "rebuild" ) {
- $response = 2;
- }
-} else {
- $response = 0;
-}
-if ( isset( $args[0] ) ) {
- $messages = loadLanguageFile( array_shift( $args ) );
-} else {
- $messages = false;
-}
-if( isset( $options['update'] ) ) $response = 1;
-if( isset( $options['rebuild'] ) ) $response = 2;
-
-if ( $response == 0 ) {
- $dbr =& wfGetDB( DB_SLAVE );
- $row = $dbr->selectRow( "page", array("count(*) as c"), array("page_namespace" => NS_MEDIAWIKI) );
- print "Current namespace size: {$row->c}\n";
-
- print <<<END
-Usage: php rebuildMessages.php <action> [filename]
-
-Action must be one of:
- --update Update messages to include latest additions to MessagesXX.php
- --rebuild Delete all messages and reinitialise namespace
-
-If a message dump file is given, messages will be read from it to supplement
-the defaults in MediaWiki's Language*.php. The file should contain a serialized
-PHP associative array, as produced by dumpMessages.php.
-
-
-END;
- exit(0);
-}
-
-switch ( $response ) {
- case 1:
- initialiseMessages( false, $messages );
- break;
- case 2:
- initialiseMessages( true, $messages );
- break;
-}
-
-exit();
-
-?>