no need for position:absolute
[lhc/web/wiklou.git] / maintenance / liveCmdLine.inc
1 <?php
2 /**
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
7 *
8 * @todo document
9 * @package MediaWiki
10 * @subpackage Maintenance
11 */
12
13 /** */
14 if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) {
15 print "This script must be run from the command line\n";
16 exit();
17 }
18
19 $wgCommandLineMode = true;
20 $self = array_shift( $argv );
21 # Turn off output buffering if it's on
22 @ob_end_flush();
23
24 if ( isset( $argv[0] ) ) {
25 $lang = array_shift( $argv );
26 } else {
27 $lang = "aa";
28 }
29 if ( isset( $argv[0] ) ) {
30 $site = array_shift( $argv );
31 } else {
32 $site = "wikipedia";
33 }
34
35 # This is for the IRC scripts, which now run as the apache user
36 if ( $_ENV['USER'] != "apache" ) {
37 $wgDBadminuser = "wikiadmin";
38 $wgDBadminpassword = trim(`wikiadmin_pass`);
39 }
40
41 $sep = strchr( $include_path = ini_get( "include_path" ), ";" ) ? ";" : ":";
42 putenv( "wikilang=$lang");
43 $newpath = "/home/wikipedia/common/php-new$sep";
44
45 $DP = "../includes";
46 #ini_set( "include_path", "$newpath$sep$include_path" );
47 ini_set( "include_path", "/home/wikipedia/common/php-new:/home/wikipedia/common/php-new/includes" );
48
49 require_once( "/home/wikipedia/common/php-new/CommonSettings.php" );
50
51 define("MEDIAWIKI",true);
52 require_once( "Setup.php" );
53 require_once( "../install-utils.inc" );
54 $wgTitle = Title::newFromText( "Command line script" );
55 $wgCommandLineMode = true;
56 set_time_limit(0);
57 ?>