inbox_users.php uses commandline.inc

This commit is contained in:
Evan Prodromou 2009-06-22 16:57:28 -07:00
parent 06f976f1ac
commit 15e86eb482

View File

@ -20,22 +20,18 @@
# Abort if called from a web server
if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) {
print "This script must be run from the command line\n";
exit();
}
ini_set("max_execution_time", "0");
ini_set("max_input_time", "0");
set_time_limit(0);
mb_internal_encoding('UTF-8');
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
define('LACONICA', true);
require_once(INSTALLDIR . '/lib/common.php');
$helptext = <<<ENDOFHELP
inbox_users.php <idfile>
$id_file = ($argc > 1) ? $argv[1] : 'ids.txt';
Update users to use inbox table. Listed in an ID file, default 'ids.txt'.
ENDOFHELP;
require_once INSTALLDIR.'/scripts/commandline.inc';
$id_file = (count($args) > 1) ? $args[0] : 'ids.txt';
common_log(LOG_INFO, 'Updating user inboxes.');