2 $wgCommandLineMode = true;
4 $sep = strchr( $include_path = ini_get( "include_path" ), ";" ) ?
";" : ":";
7 putenv( "wikilang=$lang");
8 $settingsFile = "/apache/htdocs/{$argv[1]}/w/LocalSettings.php";
9 $newpath = "/apache/common/php$sep";
11 $settingsFile = "../LocalSettings.php";
15 if ( $argv[2] == "update" ) {
17 } elseif ( $argv[2] == "reinitialise" ) {
23 if ( ! is_readable( $settingsFile ) ) {
24 print "A copy of your installation's LocalSettings.php\n" .
25 "must exist in the source directory.\n";
29 ini_set( "include_path", "../includes$sep../languages$sep$newpath$IP$sep$include_path" );
31 $wgCommandLineMode = true;
33 include_once( $settingsFile );
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;
42 if ( $response == 0 ) {
43 $row = wfGetArray( "cur", array("count(*) as c"), array("cur_namespace" => NS_MEDIAWIKI
) );
44 print "Current namespace size: {$row->c}\n";
46 print "1. Update messages to include latest additions to Language.php\n" .
47 "2. Delete all messages and reinitialise namespace\n" .
50 "Please enter a number: ";
53 $response = IntVal(readconsole());
54 if ( $response >= 1 && $response <= 3 ) {
58 print "Please type a number between 1 and 3: ";
63 switch ( $response ) {
65 initialiseMessages( false );
68 initialiseMessages( true );