typo, looks like objectcache need rewrite cause postgresql doesnt have a FROM_UNIXTIM...
[mediawiki.git] / maintenance / liveCmdLine.inc
blob5d51a6a683a78f93813c5fb967e842ade5670a4e
1 <?php
3 # This is a drop-in replacement for commandLine.inc, for use only on
4 # the Wikimedia wikis.
5 # Call your command-line script with the language name and site name,
6 # e.g. php convertLinks.php aa wikipedia
8 if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) {
9         print "This script must be run from the command line\n";
10         exit();
13 $wgCommandLineMode = true;
15 if ( isset( $argv[1] ) ) {
16         $lang = $argv[1];
17 } else {
18         $lang = "aa";
20 if ( isset( $argv[2] ) ) {
21         $site = $argv[2];
22 } else {
23         $site = "wikipedia";
26 # This is for the IRC scripts, which now run as the apache user
27 if ( $_ENV['USER'] != "apache" ) {
28         $wgDBadminuser = "wikiadmin";
29         $wgDBadminpassword = trim(`wikiadmin_pass`);
32 $sep = strchr( $include_path = ini_get( "include_path" ), ";" ) ? ";" : ":";
33 putenv( "wikilang=$lang");
34 $newpath = "/home/wikipedia/common/php-new$sep";
36 $DP = "../includes";
37 #ini_set( "include_path", "$newpath$sep$include_path" );
38 ini_set( "include_path", "/home/wikipedia/common/php-new:/home/wikipedia/common/php-new/includes" );
40 require_once( "/home/wikipedia/common/php-new/CommonSettings.php" );
42 $wgUsePHPTal = false;
44 define("MEDIAWIKI",true);
45 include_once( "Setup.php" );
46 $wgTitle = Title::newFromText( "Command line script" );
47 $wgCommandLineMode = true;
48 set_time_limit(0);