/** * Internal. This is called always when OKAPI core is included. */ public static function init_internals($allow_cronjobs = true) { static $init_made = false; if ($init_made) { return; } ini_set('memory_limit', '256M'); Db::connect(); if (Settings::get('TIMEZONE') !== null) { date_default_timezone_set(Settings::get('TIMEZONE')); } if (!self::$data_store) { self::$data_store = new OkapiDataStore(); } if (!self::$server) { self::$server = new OkapiOAuthServer(self::$data_store); } if ($allow_cronjobs) { self::execute_prerequest_cronjobs(); } $init_made = true; }
/** * Internal. This is called always when OKAPI core is included. */ public static function init_internals($allow_cronjobs = true) { static $init_made = false; if ($init_made) { return; } ini_set('memory_limit', '256M'); # The memory limit is - among other - crucial for the maximum size # of processable images; see services/logs/images/add.php: max_pixels() Db::connect(); if (Settings::get('TIMEZONE') !== null) { date_default_timezone_set(Settings::get('TIMEZONE')); } if (!self::$data_store) { self::$data_store = new OkapiDataStore(); } if (!self::$server) { self::$server = new OkapiOAuthServer(self::$data_store); } if ($allow_cronjobs) { self::execute_prerequest_cronjobs(); } $init_made = true; }