fixed problem with updateTimestamp() altering existing IP blocks
[mediawiki.git] / maintenance / commandLine.inc
blobdbf1ad8ca89ad0148f12d6e8b659f8361dc60f5f
1 <?php
2 $wgCommandLineMode = true;
4 $sep = strchr( $include_path = ini_get( "include_path" ), ";" ) ? ";" : ":";
5 if ( $argv[1] ) {
6         $lang = $argv[1];
7         putenv( "wikilang=$lang");
8         $settingsFile = "/apache/htdocs/{$argv[1]}/w/LocalSettings.php";
9         $newpath = "/apache/common/php$sep";
10 } else {
11         $settingsFile = "../LocalSettings.php";
12         $newpath = "";
15 if ( ! is_readable( $settingsFile ) ) {
16         print "A copy of your installation's LocalSettings.php\n" .
17           "must exist in the source directory.\n";
18         exit();
21 ini_set( "include_path", "../includes$sep../languages$sep$newpath$IP$sep$include_path" );
23 $wgCommandLineMode = true;
24 $DP = "../includes";
25 include_once( $settingsFile );
27 include_once( "Setup.php" );
28 include_once( "./InitialiseMessages.inc" );
29 include_once( "../install-utils.inc" );
30 $wgTitle = Title::newFromText( "Rebuild messages script" );
31 $wgCommandLineMode = true;
32 set_time_limit(0);