Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/tools/run_event.php
Show All 18 Lines | |||||
} | } | ||||
$start = microtime(true); | $start = microtime(true); | ||||
define('CRON', 1); | define('CRON', 1); | ||||
define('ADMIN', 1); | define('ADMIN', 1); | ||||
define('FULL_PATH', realpath(dirname(__FILE__) . '/..')); | define('FULL_PATH', realpath(dirname(__FILE__) . '/..')); | ||||
define('DBG_SKIP_REPORTING', 1); | define('DBG_SKIP_REPORTING', 1); | ||||
define('SKIP_OUT_COMPRESSION', 1); | |||||
$_SERVER['HTTP_USER_AGENT'] = 'gecko'; | $_SERVER['HTTP_USER_AGENT'] = 'gecko'; | ||||
// in command line, then 2nd argument is password | // in command line, then 2nd argument is password | ||||
$password = isset($argv) && isset($argv[2]) ? $argv[2] : ''; | $password = isset($argv) && isset($argv[2]) ? $argv[2] : ''; | ||||
if ( $password != 'b674006f3edb1d9cd4d838c150b0567d' ) { | if ( $password != 'b674006f3edb1d9cd4d838c150b0567d' ) { | ||||
exit_code(3, 'Bad key'); | exit_code(3, 'Bad key'); | ||||
Show All 18 Lines | |||||
function exit_code($code, $msg = '') | function exit_code($code, $msg = '') | ||||
{ | { | ||||
if ( $msg ) { | if ( $msg ) { | ||||
echo $msg . PHP_EOL; | echo $msg . PHP_EOL; | ||||
} | } | ||||
exit($code); | exit($code); | ||||
} | } | ||||
$end = microtime(true); | $end = microtime(true); | ||||
No newline at end of file |