Pasted in multi-language support from rcdumper.php
authorTim Starling <tstarling@users.mediawiki.org>
Thu, 29 Jan 2004 09:22:22 +0000 (09:22 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Thu, 29 Jan 2004 09:22:22 +0000 (09:22 +0000)
maintenance/rebuildMessages.php

index fde7d9c..30d89c7 100755 (executable)
@@ -1,19 +1,34 @@
 <?
 $wgCommandLineMode = true;
 
-if ( ! is_readable( "../LocalSettings.php" ) ) {
+$sep = strchr( $include_path = ini_get( "include_path" ), ";" ) ? ";" : ":";
+if ( $argv[1] ) {
+       $lang = $argv[1];
+       putenv( "wikilang=$lang");
+       $settingsFile = "/apache/htdocs/{$argv[1]}/w/LocalSettings.php";
+       $newpath = "/apache/common/php$sep";
+} else {
+       $settingsFile = "../LocalSettings.php";
+       $newpath = "";
+}
+
+if ( $argv[2] ) {
+       $patterns = explode( ",", $argv[2]);
+} else {
+       $patterns = false;
+}
+
+if ( ! is_readable( $settingsFile ) ) {
        print "A copy of your installation's LocalSettings.php\n" .
          "must exist in the source directory.\n";
        exit();
 }
 
+ini_set( "include_path", "$newpath$IP$sep$include_path" );
+
 $wgCommandLineMode = true;
 $DP = "../includes";
-include_once( "../LocalSettings.php" );
-include_once( "../AdminSettings.php" );
-
-$sep = strchr( $include_path = ini_get( "include_path" ), ";" ) ? ";" : ":";
-ini_set( "include_path", "../includes$sep../languages$sep$include_path" );
+include_once( $settingsFile );
 
 include_once( "Setup.php" );
 include_once( "./InitialiseMessages.inc" );