/** * Start task scheduler for each server instance */ public static function start() { include_once './Services/Context/classes/class.ilContext.php'; if (ilContext::getType() != ilContext::CONTEXT_WEB) { return; } include_once './Services/WebServices/ECS/classes/class.ilECSServerSettings.php'; $servers = ilECSServerSettings::getInstance(); foreach ($servers->getServers() as $server) { $sched = new ilECSTaskScheduler($server); if ($sched->checkNextExecution()) { $sched->initNextExecution(); } } }
/** * @static */ protected static function handleAuthenticationFail() { /** * @var $ilAuth Auth * @var $ilSetting ilSetting */ global $ilAuth, $ilSetting; // #10608 if (ilContext::getType() == ilContext::CONTEXT_SOAP) { throw new Exception("Authentication failed."); } $status = $ilAuth->getStatus(); if ($ilSetting->get('pub_section') && ($status == '' || $status == AUTH_EXPIRED || $status == AUTH_IDLED) && $_GET['reloadpublic'] != '1') { self::goToPublicSection($status); } else { self::goToLogin($status); } }
function isSOAPEnabled() { global $ilSetting; if (!extension_loaded('curl') || !$ilSetting->get('soap_user_administration')) { return false; } // Prevent using SOAP in cron context if (ilContext::getType() == ilContext::CONTEXT_CRON) { return false; } return (bool) $this->soap_enabled; }
public function initIlias() { if (ilContext::getType() == ilContext::CONTEXT_SOAP) { try { require_once "Services/Init/classes/class.ilInitialisation.php"; ilInitialisation::initILIAS(); } catch (Exception $e) { // #10608 // no need to do anything here, see __checkSession() below } } }