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