3 if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) {
4 print "This script must be run from the command line\n";
8 $wgCommandLineMode = true;
10 $sep = strchr( $include_path = ini_get( "include_path" ), ";" ) ? ";" : ":";
11 if ( @$argv[1] && @$argv[1] != "-" ) {
13 putenv( "wikilang=$lang");
14 $settingsFile = "/apache/htdocs/{$argv[1]}/w/LocalSettings.php";
15 $newpath = "/apache/common/php$sep";
17 $settingsFile = "../LocalSettings.php";
21 if ( ! is_readable( $settingsFile ) ) {
22 print "A copy of your installation's LocalSettings.php\n" .
23 "must exist in the source directory.\n";
28 $wgCommandLineMode = true;
30 include_once( $settingsFile );
31 ini_set( "include_path", "../includes$sep../languages$sep$newpath$IP$sep$include_path" );
34 define("MEDIAWIKI",true);
35 include_once( "Setup.php" );
36 include_once( "./InitialiseMessages.inc" );
37 include_once( "../install-utils.inc" );
38 $wgTitle = Title::newFromText( "Rebuild messages script" );
39 $wgCommandLineMode = true;