X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=scripts%2Fcommandline.inc;h=392166a98088dae0ca2f563b0a1709b68ccc7e9b;hb=d1afc7812413493a4b4d0d788c87150bad35b74d;hp=9390890ef33c0f7379c38d58fee4325aefdd935e;hpb=59119482ca34540bd7f0a2a1aa994de1d5328ea2;p=quix0rs-gnu-social.git diff --git a/scripts/commandline.inc b/scripts/commandline.inc index 9390890ef3..392166a980 100644 --- a/scripts/commandline.inc +++ b/scripts/commandline.inc @@ -26,8 +26,10 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) { exit(); } -define('STATUSNET', true); -define('LACONICA', true); // compatibility +define('GNUSOCIAL', true); +define('STATUSNET', true); //compatibility + +define('GNUSOCIAL_CLI', true); // to know we're in a CLI environment // Set various flags so we don't time out on long-running processes @@ -35,6 +37,7 @@ ini_set("max_execution_time", "0"); ini_set("max_input_time", "0"); set_time_limit(0); mb_internal_encoding('UTF-8'); +error_reporting(E_ALL & ~E_STRICT & ~E_DEPRECATED); // Add extlib to our path so we can get Console_Getopt @@ -188,13 +191,13 @@ function getUser() if (have_option('i', 'id')) { $id = get_option_value('i', 'id'); - $user = User::staticGet('id', $id); + $user = User::getKV('id', $id); if (empty($user)) { throw new Exception("Can't find user with id '$id'."); } } else if (have_option('n', 'nickname')) { $nickname = get_option_value('n', 'nickname'); - $user = User::staticGet('nickname', $nickname); + $user = User::getKV('nickname', $nickname); if (empty($user)) { throw new Exception("Can't find user with nickname '$nickname'"); } @@ -243,4 +246,4 @@ function printfv() $format = array_shift($args); return vprintf($format, $args); -} \ No newline at end of file +}