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
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
+
+$_extra_path = array(INSTALLDIR.'/extlib/');
+
+set_include_path(implode(PATH_SEPARATOR, $_extra_path) . PATH_SEPARATOR . get_include_path());
-require_once INSTALLDIR . '/extlib/Console/Getopt.php';
+require_once 'Console/Getopt.php';
// Note: $shortoptions and $longoptions should be pre-defined!