39if ( PHP_SAPI !==
'cli' && PHP_SAPI !==
'phpdbg' ) {
40 echo
"This script must be run from the command line\n";
44$IP = getenv(
'MW_INSTALL_PATH' );
47 $IP = dirname( __DIR__ );
49 putenv(
"MW_INSTALL_PATH=$IP" );
52require_once
"$IP/maintenance/Maintenance.php";
54if ( !isset( $argv[1] ) ) {
55 fwrite( STDERR,
"This script requires a maintenance script as an argument.\n"
56 .
"Usage: php runScript.php extensions/Wikibase/lib/maintenance/dispatchChanges.php\n" );
66 fwrite( STDERR,
"The MediaWiki script file \"{$scriptFilename}\" does not exist.\n" );
if(!isset( $argv[1])) $scriptFilename
if(PHP_SAPI !=='cli' &&PHP_SAPI !=='phpdbg' $IP)