13require_once(
"libs/composer/vendor/autoload.php");
17 $GLOBALS[
'ilGlobalStartTime'] = microtime();
20include_once
"Services/Context/classes/class.ilContext.php";
55 foreach ($var as $k => $v) {
63 array(
"\x00",
"\n",
"\r",
"\\",
"'",
'"',
"\x1a"),
77 require_once
"./Services/UICore/classes/class.ilTemplate.php";
81 require_once
"./Services/Utilities/classes/class.ilUtil.php";
82 require_once
"./Services/Calendar/classes/class.ilDatePresentation.php";
83 require_once
"include/inc.ilias_version.php";
85 include_once
'./Services/Authentication/classes/class.ilAuthUtils.php';
87 self::initGlobal(
"ilBench",
"ilBenchmark",
"./Services/Utilities/classes/class.ilBenchmark.php");
97 include_once
'Services/Authentication/classes/class.ilAuthFactory.php';
99 require_once(
"include/inc.xml5compliance.php");
101 require_once(
"include/inc.xsl5compliance.php");
113 require_once(
"./Services/Init/classes/class.ilIniFile.php");
119 define(
"ILIAS_DATA_DIR",
$ilIliasIniFile->readVariable(
"clients",
"datadir"));
120 define(
"ILIAS_WEB_DIR",
$ilIliasIniFile->readVariable(
"clients",
"path"));
121 define(
"ILIAS_ABSOLUTE_PATH",
$ilIliasIniFile->readVariable(
'server',
'absolute_path'));
125 define(
"ILIAS_LOG_FILE",
$ilIliasIniFile->readVariable(
"log",
"file"));
126 define(
"ILIAS_LOG_ENABLED",
$ilIliasIniFile->readVariable(
"log",
"enabled"));
127 define(
"ILIAS_LOG_LEVEL",
$ilIliasIniFile->readVariable(
"log",
"level"));
128 define(
"SLOW_REQUEST_TIME",
$ilIliasIniFile->readVariable(
"log",
"slow_request_time"));
131 define(
"PATH_TO_CONVERT",
$ilIliasIniFile->readVariable(
"tools",
"convert"));
132 define(
"PATH_TO_FFMPEG",
$ilIliasIniFile->readVariable(
"tools",
"ffmpeg"));
134 define(
"PATH_TO_MKISOFS",
$ilIliasIniFile->readVariable(
"tools",
"mkisofs"));
135 define(
"PATH_TO_UNZIP",
$ilIliasIniFile->readVariable(
"tools",
"unzip"));
136 define(
"PATH_TO_GHOSTSCRIPT",
$ilIliasIniFile->readVariable(
"tools",
"ghostscript"));
137 define(
"PATH_TO_JAVA",
$ilIliasIniFile->readVariable(
"tools",
"java"));
138 define(
"URL_TO_LATEX",
$ilIliasIniFile->readVariable(
"tools",
"latex"));
140 define(
"PATH_TO_LESSC",
$ilIliasIniFile->readVariable(
"tools",
"lessc"));
141 define(
"PATH_TO_PHANTOMJS",
$ilIliasIniFile->readVariable(
"tools",
"phantomjs"));
146 define(
"IL_VIRUS_SCANNER",
"Sophos");
147 define(
"IL_VIRUS_SCAN_COMMAND",
$ilIliasIniFile->readVariable(
"tools",
"scancommand"));
148 define(
"IL_VIRUS_CLEAN_COMMAND",
$ilIliasIniFile->readVariable(
"tools",
"cleancommand"));
152 define(
"IL_VIRUS_SCANNER",
"AntiVir");
153 define(
"IL_VIRUS_SCAN_COMMAND",
$ilIliasIniFile->readVariable(
"tools",
"scancommand"));
154 define(
"IL_VIRUS_CLEAN_COMMAND",
$ilIliasIniFile->readVariable(
"tools",
"cleancommand"));
158 define(
"IL_VIRUS_SCANNER",
"ClamAV");
159 define(
"IL_VIRUS_SCAN_COMMAND",
$ilIliasIniFile->readVariable(
"tools",
"scancommand"));
160 define(
"IL_VIRUS_CLEAN_COMMAND",
$ilIliasIniFile->readVariable(
"tools",
"cleancommand"));
164 define(
"IL_VIRUS_SCANNER",
"None");
168 include_once
'./Services/Calendar/classes/class.ilTimeZone.php';
170 define(
"IL_TIMEZONE",
$tz);
184 public static function bootstrapFilesystems()
188 $DIC[
'filesystem.security.sanitizing.filename'] =
function (
$c) {
192 $DIC[
'filesystem.factory'] =
function (
$c) {
193 return new \ILIAS\Filesystem\Provider\DelegatingFilesystemFactory(
$c[
'filesystem.security.sanitizing.filename']);
196 $DIC[
'filesystem.web'] =
function (
$c) {
202 $delegatingFactory =
$c[
'filesystem.factory'];
203 $webConfiguration = new \ILIAS\Filesystem\Provider\Configuration\LocalConfig(ILIAS_ABSOLUTE_PATH .
'/' . ILIAS_WEB_DIR .
'/' . CLIENT_ID);
204 return $delegatingFactory->getLocal($webConfiguration);
207 $DIC[
'filesystem.storage'] =
function (
$c) {
213 $delegatingFactory =
$c[
'filesystem.factory'];
214 $storageConfiguration = new \ILIAS\Filesystem\Provider\Configuration\LocalConfig(ILIAS_DATA_DIR .
'/' . CLIENT_ID);
215 return $delegatingFactory->getLocal($storageConfiguration);
218 $DIC[
'filesystem.temp'] =
function (
$c) {
224 $delegatingFactory =
$c[
'filesystem.factory'];
225 $tempConfiguration = new \ILIAS\Filesystem\Provider\Configuration\LocalConfig(ILIAS_DATA_DIR .
'/' . CLIENT_ID .
'/temp');
226 return $delegatingFactory->getLocal($tempConfiguration);
229 $DIC[
'filesystem.customizing'] =
function (
$c) {
235 $delegatingFactory =
$c[
'filesystem.factory'];
236 $customizingConfiguration = new \ILIAS\Filesystem\Provider\Configuration\LocalConfig(ILIAS_ABSOLUTE_PATH .
'/' .
'Customizing');
237 return $delegatingFactory->getLocal($customizingConfiguration);
240 $DIC[
'filesystem.libs'] =
function (
$c) {
246 $delegatingFactory =
$c[
'filesystem.factory'];
247 $customizingConfiguration = new \ILIAS\Filesystem\Provider\Configuration\LocalConfig(ILIAS_ABSOLUTE_PATH .
'/' .
'libs');
248 return $delegatingFactory->getLocal($customizingConfiguration,
true);
251 $DIC[
'filesystem'] =
function (
$c) {
252 return new \ILIAS\Filesystem\FilesystemsImpl(
253 $c[
'filesystem.storage'],
254 $c[
'filesystem.web'],
255 $c[
'filesystem.temp'],
256 $c[
'filesystem.customizing'],
257 $c[
'filesystem.libs']
273 $dic[
'upload.processor-manager'] =
function (
$c) {
274 return new \ILIAS\FileUpload\Processor\PreProcessorManagerImpl();
277 $dic[
'upload'] =
function (
$c) {
278 $fileUploadImpl = new \ILIAS\FileUpload\FileUploadImpl(
$c[
'upload.processor-manager'],
$c[
'filesystem'],
$c[
'http']);
279 if (IL_VIRUS_SCANNER !=
"None") {
283 $fileUploadImpl->register(
new \
ILIAS\FileUpload\Processor\FilenameSanitizerPreProcessor());
285 return $fileUploadImpl;
294 include_once
'./Services/Http/classes/class.ilHTTPS.php';
297 if (
$https->isDetected()) {
304 $rq_uri = strip_tags(
$_SERVER[
'REQUEST_URI']);
308 if (is_int($pos = strpos($rq_uri,
"?"))) {
309 $rq_uri = substr($rq_uri, 0, $pos);
312 if (!defined(
'ILIAS_MODULE')) {
313 $path = pathinfo($rq_uri);
314 if (!
$path[
'extension']) {
317 $uri = dirname($rq_uri);
321 $path = dirname($rq_uri);
328 foreach ($dirs as $dir) {
329 $uri = dirname($uri);
355 self::abortAndDie(
'Fatal Error: ilInitialisation::determineClient called without initialisation of ILIAS ini file object.');
358 if (isset(
$_GET[
'client_id']) && strlen(
$_GET[
'client_id']) > 0) {
360 if (!defined(
'IL_PHPUNIT_TEST')) {
365 } elseif (!isset(
$_COOKIE[
'ilClientId'])) {
395 if (ILIAS_WEB_DIR ==
"") {
396 self::abortAndDie(
"Fatal Error: ilInitialisation::initClientIniFile called without ILIAS_WEB_DIR.");
400 if (CLIENT_ID ==
"") {
401 self::abortAndDie(
"Fatal Error: ilInitialisation::initClientIniFile called without CLIENT_ID.");
404 $ini_file =
"./" . ILIAS_WEB_DIR .
"/" . CLIENT_ID .
"/client.ini.php";
407 $ilClientIniFile =
new ilIniFile($ini_file);
408 $ilClientIniFile->read();
411 if ($ilClientIniFile->ERROR !=
"") {
415 if (CLIENT_ID !=
"" && CLIENT_ID != $default_client) {
416 $mess = array(
"en" =>
"Client does not exist.",
417 "de" =>
"Mandant ist ungültig.");
418 self::redirect(
"index.php?client_id=" . $default_client,
null, $mess);
420 self::abortAndDie(
"Fatal Error: ilInitialisation::initClientIniFile initializing client ini file abborted with: " . $ilClientIniFile->ERROR);
427 define(
"SESSION_REMINDER_LEADTIME", 30);
428 define(
"DEBUG", $ilClientIniFile->readVariable(
"system",
"DEBUG"));
429 define(
"DEVMODE", $ilClientIniFile->readVariable(
"system",
"DEVMODE"));
430 define(
"SHOWNOTICES", $ilClientIniFile->readVariable(
"system",
"SHOWNOTICES"));
431 define(
"DEBUGTOOLS", $ilClientIniFile->readVariable(
"system",
"DEBUGTOOLS"));
432 define(
"ROOT_FOLDER_ID", $ilClientIniFile->readVariable(
'system',
'ROOT_FOLDER_ID'));
433 define(
"SYSTEM_FOLDER_ID", $ilClientIniFile->readVariable(
'system',
'SYSTEM_FOLDER_ID'));
434 define(
"ROLE_FOLDER_ID", $ilClientIniFile->readVariable(
'system',
'ROLE_FOLDER_ID'));
435 define(
"MAIL_SETTINGS_ID", $ilClientIniFile->readVariable(
'system',
'MAIL_SETTINGS_ID'));
436 $error_handler = $ilClientIniFile->readVariable(
'system',
'ERROR_HANDLER');
437 define(
"ERROR_HANDLER", $error_handler ? $error_handler :
"PRETTY_PAGE");
441 define(
"OH_REF_ID", $ilClientIniFile->readVariable(
"system",
"OH_REF_ID"));
443 define(
"SYSTEM_MAIL_ADDRESS", $ilClientIniFile->readVariable(
'system',
'MAIL_SENT_ADDRESS'));
444 define(
"MAIL_REPLY_WARNING", $ilClientIniFile->readVariable(
'system',
'MAIL_REPLY_WARNING'));
450 define(
"CLIENT_DATA_DIR", ILIAS_DATA_DIR .
"/" . CLIENT_ID);
451 define(
"CLIENT_WEB_DIR", ILIAS_ABSOLUTE_PATH .
"/" . ILIAS_WEB_DIR .
"/" . CLIENT_ID);
452 define(
"CLIENT_NAME", $ilClientIniFile->readVariable(
'client',
'name'));
454 $val = $ilClientIniFile->readVariable(
"db",
"type");
456 define(
"IL_DB_TYPE",
"mysql");
458 define(
"IL_DB_TYPE", $val);
462 $ilGlobalCacheSettings->readFromIniFile($ilClientIniFile);
473 global $ilClientIniFile;
475 if (!$ilClientIniFile->readVariable(
"client",
"access")) {
476 $mess = array(
"en" =>
"The server is not available due to maintenance." .
477 " We apologise for any inconvenience.",
478 "de" =>
"Der Server ist aufgrund von Wartungsarbeiten nicht verfügbar." .
479 " Wir bitten um Verständnis.");
480 $mess_id =
"init_error_maintenance";
498 require_once(
"./Services/Database/classes/class.ilDBWrapperFactory.php");
499 $ilDB = ilDBWrapperFactory::getWrapper(IL_DB_TYPE);
500 $ilDB->initFromIniFile();
513 if (ini_get(
'session.save_handler') !=
'user' && version_compare(PHP_VERSION,
'7.2.0',
'<')) {
514 ini_set(
"session.save_handler",
"user");
517 require_once
"Services/Authentication/classes/class.ilSessionDBHandler.php";
519 if (!$db_session_handler->setSaveHandler()) {
520 self::abortAndDie(
"Please turn off Safe mode OR set session.save_handler to \"user\" in your php.ini");
526 if (function_exists(
"session_status") && session_status() == PHP_SESSION_ACTIVE) {
527 session_regenerate_id();
537 include_once
'Services/Authentication/classes/class.ilAuthFactory.php';
540 } elseif (
$GLOBALS[
'COOKIE_PATH']) {
558 define(
'IL_COOKIE_HTTPONLY',
true);
559 define(
'IL_COOKIE_EXPIRE', 0);
561 define(
'IL_COOKIE_DOMAIN',
'');
571 if (!defined(
'IL_COOKIE_SECURE')) {
575 include_once
'./Services/Http/classes/class.ilHTTPS.php';
577 define(
'IL_COOKIE_SECURE', $cookie_secure);
579 session_set_cookie_params(
595 return new \ilMailMimeTransportFactory(
$c->settings(),
$c->event());
598 return new \ilMailMimeSenderFactory(
$c->settings());
610 $c[
"object.customicons.factory"] =
function (
$c) {
611 require_once
'Services/Object/Icon/classes/class.ilObjectCustomIconFactory.php';
613 $c->filesystem()->web(),
625 $c[
"user.avatar.factory"] =
function (
$c) {
626 return new \ilUserAvatarFactory(
$c);
642 $c[
'tos.criteria.type.factory'],
665 "Services/Administration/classes/class.ilSetting.php"
674 define(
"ANONYMOUS_USER_ID",
$ilSetting->get(
"anonymous_user_id"));
675 define(
"ANONYMOUS_ROLE_ID",
$ilSetting->get(
"anonymous_role_id"));
676 define(
"SYSTEM_USER_ID",
$ilSetting->get(
"system_user_id"));
677 define(
"SYSTEM_ROLE_ID",
$ilSetting->get(
"system_role_id"));
678 define(
"USER_FOLDER_ID", 7);
681 define(
"RECOVERY_FOLDER_ID",
$ilSetting->get(
"recovery_folder_id"));
684 define(
"IL_INST_ID",
$ilSetting->get(
"inst_id", 0));
687 define(
"SUFFIX_REPL_DEFAULT",
"php,php3,php4,inc,lang,phtml,htaccess");
688 define(
"SUFFIX_REPL_ADDITIONAL",
$ilSetting->get(
"suffix_repl_additional"));
700 global
$DIC, $ilPluginAdmin;
706 "./Services/Style/System/classes/class.ilStyleDefinition.php"
710 $pl_names = $ilPluginAdmin->getActivePluginsForSlot(
IL_COMP_SERVICE,
"UIComponent",
"uihk");
711 foreach ($pl_names as $pl) {
713 $gui_class = $ui_plugin->getUIClassInstance();
714 $gui_class->modifyGUI(
"Services/Init",
"init_style", array(
"styleDefinition" =>
$DIC->systemStyle()));
721 public static function initUserAccount()
728 $uid =
$GLOBALS[
'DIC'][
'ilAuthSession']->getUserId();
734 include_once
'./Services/Logging/classes/public/class.ilLoggerFactory.php';
736 \ilOnlineTracking::updateAccess(
$ilUser);
753 $larr = explode(
",", trim(
$ilSetting->get(
"locale")));
756 foreach ($larr as
$l) {
757 if (trim(
$l) !=
"") {
761 if (count($ls) > 0) {
762 setlocale(LC_ALL, $ls);
765 setlocale(LC_NUMERIC,
"C");
767 if (class_exists(
"Collator")) {
768 $GLOBALS[
"ilCollator"] =
new Collator($first);
769 $GLOBALS[
"DIC"][
"ilCollator"] =
function (
$c) {
786 if (ANONYMOUS_USER_ID ==
"") {
790 $session_destroyed =
false;
791 if (
$GLOBALS[
'DIC'][
'ilAuthSession']->isExpired()) {
792 $session_destroyed =
true;
795 if (!
$GLOBALS[
'DIC'][
'ilAuthSession']->isAuthenticated()) {
796 $session_destroyed =
true;
800 if ($session_destroyed) {
801 $GLOBALS[
'DIC'][
'ilAuthSession']->setAuthenticated(
true, ANONYMOUS_USER_ID);
804 self::initUserAccount();
807 if (strlen(
$_GET[
"target"])) {
809 $current_script = substr(strrchr(
$_SERVER[
"PHP_SELF"],
"/"), 1);
810 if ($current_script ==
"goto.php") {
818 #if(!$GLOBALS['DIC']->rbac()->system()->checkAccess('read', ROOT_FOLDER_ID))
820 # return self::goToLogin();
824 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
825 $_GET[
"cmd"] =
"frameset";
827 "ilias.php?baseClass=ilrepositorygui&reloadpublic=1&cmd=" .
841 if (
$GLOBALS[
'DIC'][
'ilAuthSession']->isExpired()) {
844 if (!
$GLOBALS[
'DIC'][
'ilAuthSession']->isAuthenticated()) {
848 $script =
"login.php?target=" .
$_GET[
"target"] .
"&client_id=" .
$_COOKIE[
"ilClientId"] .
849 "&auth_stat=" . $a_auth_stat;
853 "init_error_authentication_fail",
855 "en" =>
"Authentication failed.",
856 "de" =>
"Authentifizierung fehlgeschlagen.")
863 protected static function initLanguage($a_use_user_language =
true)
872 require_once
'Services/Language/classes/class.ilLanguage.php';
874 if ($a_use_user_language) {
875 if (
$DIC->offsetExists(
'lng')) {
876 $DIC->offsetUnset(
'lng');
882 if (is_object($rbacsystem) &&
$DIC->offsetExists(
'tree')) {
883 $rbacsystem->initMemberView();
895 "./Services/AccessControl/classes/class.ilRbacReview.php"
898 require_once
"./Services/AccessControl/classes/class.ilRbacSystem.php";
905 "./Services/AccessControl/classes/class.ilRbacAdmin.php"
911 "./Services/AccessControl/classes/class.ilAccess.php"
914 require_once
"./Services/Conditions/classes/class.ilConditionHandler.php";
922 include_once
'./Services/Logging/classes/public/class.ilLoggerFactory.php';
937 protected static function initGlobal($a_name, $a_class, $a_source_file =
null)
941 if ($a_source_file) {
942 include_once $a_source_file;
948 $DIC[$a_name] =
function (
$c) use ($a_name) {
961 $GLOBALS[
'ilLog']->write(
"Fatal Error: ilInitialisation - " . $a_message);
971 if (defined(SHOWNOTICES) && SHOWNOTICES) {
976 error_reporting(E_ALL);
979 if (defined(
'DEBUGTOOLS') && DEBUGTOOLS) {
980 include_once
"include/inc.debug.php";
989 self::$already_initialized =
false;
998 if (self::$already_initialized) {
1008 if (is_object(
$tpl)) {
1011 $tpl->setVariable(
"LOCATION_STYLESHEET", $location_stylesheet);
1018 $GLOBALS[
"DIC"] = new \ILIAS\DI\Container();
1019 $GLOBALS[
"DIC"][
"ilLoggerFactory"] =
function (
$c) {
1023 self::$already_initialized =
true;
1044 self::initLanguage(
true);
1045 $GLOBALS[
'DIC'][
'tree']->initLangCode();
1052 include_once(
'./Services/WebServices/ECS/classes/class.ilECSTaskScheduler.php');
1065 $GLOBALS[
"DIC"][
"ilAuthSession"] =
function (
$c) {
1067 $c[
'ilLoggerFactory']->getLogger(
'auth')
1069 $auth_session->init();
1070 return $auth_session;
1081 error_reporting(E_ALL & ~E_NOTICE);
1106 "./Services/Init/classes/class.ilErrorHandling.php"
1114 include_once
"Services/Authentication/classes/class.ilSession.php";
1123 define(
'IL_INITIAL_WD', getcwd());
1126 self::initGlobal(
"ilias",
"ILIAS",
"./Services/Init/classes/class.ilias.php");
1140 self::bootstrapFilesystems();
1147 $ilias->client_id = CLIENT_ID;
1159 self::initLanguage(
false);
1165 "ilAppEventHandler",
1166 "ilAppEventHandler",
1167 "./Services/EventHandling/classes/class.ilAppEventHandler.php"
1179 "./Services/Component/classes/class.ilPluginAdmin.php"
1197 self::initGlobal(
"https",
"ilHTTPS",
"./Services/Http/classes/class.ilHTTPS.php");
1198 $https->enableSecureCookies();
1207 "ilObjectDataCache",
1208 "./Services/Object/classes/class.ilObjectDataCache.php"
1212 require_once
"./Services/Xml/classes/class.ilSaxParser.php";
1216 "ilObjectDefinition",
1217 "./Services/Object/classes/class.ilObjectDefinition.php"
1221 require_once
"./Services/Tree/classes/class.ilTree.php";
1229 "./Services/UICore/classes/class.ilCtrl.php"
1246 "./Services/User/classes/class.ilObjUser.php"
1258 include_once
'./Services/Authentication/classes/class.ilAuthUtils.php';
1264 !
$GLOBALS[
'DIC'][
'ilAuthSession']->isAuthenticated() or
1265 $GLOBALS[
'DIC'][
'ilAuthSession']->isExpired()
1268 $current_script = substr(strrchr(
$_SERVER[
"PHP_SELF"],
"/"), 1);
1269 if (self::blockedAuthentication($current_script)) {
1274 return self::handleAuthenticationFail();
1277 return self::initUserAccount();
1287 global $ilAuth, $ilias,
$ilErr;
1289 $current_script = substr(strrchr(
$_SERVER[
"PHP_SELF"],
"/"), 1);
1291 if (self::blockedAuthentication($current_script)) {
1295 $oldSid = session_id();
1298 $ilias->setAuthError(
$ilErr->getLastError());
1300 if ($ilAuth->getAuth() && $ilAuth->getStatus() ==
'') {
1301 self::initUserAccount();
1303 self::handleAuthenticationSuccess();
1305 if (!self::showingLoginForm($current_script)) {
1307 $mandatory_auth = ($current_script !=
"shib_login.php"
1308 && $current_script !=
"shib_logout.php"
1309 && $current_script !=
"saml.php"
1310 && $current_script !=
"error.php"
1311 && $current_script !=
"chat.php"
1312 && $current_script !=
"wac.php"
1313 && $current_script !=
"index.php");
1315 if ($mandatory_auth) {
1316 self::handleAuthenticationFail();
1325 protected static function handleAuthenticationSuccess()
1332 require_once
'Services/Tracking/classes/class.ilOnlineTracking.php';
1333 ilOnlineTracking::updateAccess(
$ilUser);
1339 protected static function handleAuthenticationFail()
1353 throw new Exception(
"Authentication failed.");
1356 $GLOBALS[
'DIC'][
'ilAuthSession']->isExpired() &&
1376 return new \ILIAS\HTTP\Request\RequestFactoryImpl();
1380 return new \ILIAS\HTTP\Response\ResponseFactoryImpl();
1383 $container[
'http.cookie_jar_factory'] =
function (
$c) {
1384 return new \ILIAS\HTTP\Cookies\CookieJarFactoryImpl();
1387 $container[
'http.response_sender_strategy'] =
function (
$c) {
1388 return new \ILIAS\HTTP\Response\Sender\DefaultResponseSenderStrategy();
1392 return new \ILIAS\DI\HTTPServices(
1393 $c[
'http.response_sender_strategy'],
1394 $c[
'http.cookie_jar_factory'],
1395 $c[
'http.request_factory'],
1396 $c[
'http.response_factory']
1406 $c[
"global_screen"] =
function () use (
$c) {
1413 $c[
"ui.factory"] =
function (
$c) {
1415 $c[
"ui.factory.counter"],
1416 $c[
"ui.factory.glyph"],
1417 $c[
"ui.factory.button"],
1418 $c[
"ui.factory.listing"],
1419 $c[
"ui.factory.image"],
1420 $c[
"ui.factory.panel"],
1421 $c[
"ui.factory.modal"],
1422 $c[
"ui.factory.dropzone"],
1423 $c[
"ui.factory.popover"],
1424 $c[
"ui.factory.divider"],
1425 $c[
"ui.factory.link"],
1426 $c[
"ui.factory.dropdown"],
1427 $c[
"ui.factory.item"],
1428 $c[
"ui.factory.icon"],
1429 $c[
"ui.factory.viewcontrol"],
1430 $c[
"ui.factory.chart"],
1431 $c[
"ui.factory.input"],
1432 $c[
"ui.factory.table"],
1433 $c[
"ui.factory.messagebox"],
1434 $c[
"ui.factory.card"]
1437 $c[
"ui.signal_generator"] =
function (
$c) {
1440 $c[
"ui.factory.counter"] =
function (
$c) {
1443 $c[
"ui.factory.glyph"] =
function (
$c) {
1446 $c[
"ui.factory.button"] =
function (
$c) {
1449 $c[
"ui.factory.listing"] =
function (
$c) {
1452 $c[
"ui.factory.image"] =
function (
$c) {
1455 $c[
"ui.factory.panel"] =
function (
$c) {
1458 $c[
"ui.factory.modal"] =
function (
$c) {
1461 $c[
"ui.factory.dropzone"] =
function (
$c) {
1464 $c[
"ui.factory.popover"] =
function (
$c) {
1467 $c[
"ui.factory.divider"] =
function (
$c) {
1470 $c[
"ui.factory.link"] =
function (
$c) {
1473 $c[
"ui.factory.dropdown"] =
function (
$c) {
1476 $c[
"ui.factory.item"] =
function (
$c) {
1479 $c[
"ui.factory.icon"] =
function (
$c) {
1482 $c[
"ui.factory.viewcontrol"] =
function (
$c) {
1485 $c[
"ui.factory.chart"] =
function (
$c) {
1488 $c[
"ui.factory.input"] =
function (
$c) {
1490 $c[
"ui.signal_generator"],
1491 $c[
"ui.factory.input.field"],
1492 $c[
"ui.factory.input.container"]
1495 $c[
"ui.factory.table"] =
function (
$c) {
1498 $c[
"ui.factory.messagebox"] =
function (
$c) {
1501 $c[
"ui.factory.card"] =
function (
$c) {
1504 $c[
"ui.factory.progressmeter"] =
function (
$c) {
1507 $c[
"ui.factory.dropzone.file"] =
function (
$c) {
1510 $c[
"ui.factory.input.field"] =
function (
$c) {
1515 $c[
"ui.signal_generator"],
1517 $validation_factory,
1518 $transformation_factory
1521 $c[
"ui.factory.input.container"] =
function (
$c) {
1523 $c[
"ui.factory.input.container.form"]
1526 $c[
"ui.factory.input.container.form"] =
function (
$c) {
1528 $c[
"ui.factory.input.field"]
1531 $c[
"ui.factory.panel.listing"] =
function (
$c) {
1535 $c[
"ui.renderer"] =
function (
$c) {
1537 $c[
"ui.component_renderer_loader"]
1540 $c[
"ui.component_renderer_loader"] =
function (
$c) {
1542 new ILIAS\
UI\Implementation\Render\LoaderResourceRegistryWrapper(
1543 $c[
"ui.resource_registry"],
1544 new ILIAS\
UI\Implementation\Render\FSLoader(
1545 new ILIAS\
UI\Implementation\Render\DefaultRendererFactory(
1547 $c[
"ui.template_factory"],
1549 $c[
"ui.javascript_binding"]
1551 new ILIAS\
UI\Implementation\Component\Glyph\GlyphRendererFactory(
1553 $c[
"ui.template_factory"],
1555 $c[
"ui.javascript_binding"]
1561 $c[
"ui.template_factory"] =
function (
$c) {
1566 $c[
"ui.resource_registry"] =
function (
$c) {
1569 $c[
"ui.javascript_binding"] =
function (
$c) {
1580 require_once
"./Services/LTI/classes/class.ilLTIViewGUI.php";
1593 if ($lti->isActive()) {
1594 include_once
"./Services/LTI/classes/class.ilTemplate.php";
1603 require_once
'Services/User/classes/class.ilUserRequestTargetAdjustment.php';
1605 $request_adjuster->adjust();
1611 $tpl->setVariable(
"LOCATION_STYLESHEET", $location_stylesheet);
1613 require_once
"./Services/UICore/classes/class.ilFrameTargetInfo.php";
1616 "ilNavigationHistory",
1617 "ilNavigationHistory",
1618 "Services/Navigation/classes/class.ilNavigationHistory.php"
1624 "./Services/Utilities/classes/class.ilBrowser.php"
1630 "Services/Help/classes/class.ilHelpGUI.php"
1636 "./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php"
1642 "./Services/Locator/classes/class.ilLocatorGUI.php"
1648 "./Services/UIComponent/Tabs/classes/class.ilTabsGUI.php"
1653 if ($lti->isActive()) {
1654 include_once
'./Services/LTI/classes/class.ilMainMenuGUI.php';
1657 include_once
'./Services/MainMenu/classes/class.ilMainMenuGUI.php';
1667 $_GET[
'limit'] = (int)
$ilUser->getPref(
'hits_per_page');
1676 if (isset(
$_GET[
'offset']) &&
$_GET[
'offset'] !=
"") {
1683 include_once
"Services/User/classes/class.ilObjUser.php";
1694 $cmd = $_REQUEST[
"cmd"];
1695 if (is_array($cmd)) {
1696 return array_shift(array_keys($cmd));
1734 $a_current_script ==
"register.php" ||
1735 $a_current_script ==
"pwassist.php" ||
1736 $a_current_script ==
"confirmReg.php" ||
1737 $a_current_script ==
"il_securimage_play.php" ||
1738 $a_current_script ==
"il_securimage_show.php" ||
1739 $a_current_script ==
'login.php'
1745 if ($_REQUEST[
"baseClass"] ==
"ilStartUpGUI") {
1746 $cmd_class = $_REQUEST[
"cmdClass"];
1748 if ($cmd_class ==
"ilaccountregistrationgui" ||
1749 $cmd_class ==
"ilpasswordassistancegui") {
1756 $cmd ==
"showTermsOfService" || $cmd ==
"showClientList" ||
1757 $cmd ==
'showAccountMigration' || $cmd ==
'migrateAccount' ||
1758 $cmd ==
'processCode' || $cmd ==
'showLoginPage' || $cmd ==
'doStandardAuthentication' || $cmd ==
'doCasAuthentication'
1766 if (($a_current_script ==
"goto.php" &&
$_GET[
"target"] ==
"impr_0") ||
1767 $_GET[
"baseClass"] ==
"ilImprintGUI") {
1772 if ($a_current_script ==
'goto.php' && in_array(
$_GET[
'target'], array(
1773 'usr_registration',
'usr_nameassist',
'usr_pwassist',
'usr_agreement'
1790 if ($a_current_script ==
"login.php") {
1794 if ($_REQUEST[
"baseClass"] ==
"ilStartUpGUI" &&
1795 self::getCurrentCmd() ==
"showLoginPage") {
1818 } elseif ($_REQUEST[
"lang"]) {
1819 $lang = (string) $_REQUEST[
"lang"];
1822 } elseif ($ilClientIniFile) {
1823 $lang = $ilClientIniFile->readVariable(
"language",
"default");
1830 if (
$ilDB && $a_message_id) {
1832 require_once
"./Services/Language/classes/class.ilLanguage.php";
1836 $lng->loadLanguageModule(
"init");
1838 } elseif (is_array($a_message_static)) {
1839 if (!isset($a_message_static[
$lang])) {
1855 protected static function redirect($a_target, $a_message_id =
'', array $a_message_static =
null)
1858 if (defined(
"ILIAS_HTTP_PATH") &&
1859 !stristr($a_target, ILIAS_HTTP_PATH)) {
1860 $a_target = ILIAS_HTTP_PATH .
"/" . $a_target;
1863 foreach ([
'ext_uid',
'soap_pw'] as $param) {
1864 if (
false === strpos($a_target, $param .
'=') && isset(
$GLOBALS[
'DIC']->
http()->request()->getQueryParams()[$param])) {
1866 $GLOBALS[
'DIC']->
http()->request()->getQueryParams()[$param]
1879 "init_error_redirect_click",
1880 array(
"en" =>
'Please click to continue.',
1881 "de" =>
'Bitte klicken um fortzufahren.')
1884 '<br /><a href="' . $a_target .
'">' . $link .
'</a>';
1893 "init_error_redirect_info",
1894 array(
"en" =>
'Redirect not supported by context.',
1895 "de" =>
'Weiterleitungen werden durch Kontext nicht unterstützt.')
1897 ' (' . $a_target .
')';
1908 public static function redirectToStartingPage()
1916 if (
$ilUser->getId() == ANONYMOUS_USER_ID) {
1923 if (!
$_GET[
"target"]) {
1926 include_once
'./Services/User/classes/class.ilUserUtil.php';
1939 $n_of_tasks =
$ilIliasIniFile->readVariable(
"background_tasks",
"number_of_concurrent_tasks");
1942 $n_of_tasks = $n_of_tasks ? $n_of_tasks : 5;
1945 $c[
"bt.task_factory"] =
function (
$c) {
1946 return new \ILIAS\BackgroundTasks\Implementation\Tasks\BasicTaskFactory(
$c[
"di.injector"]);
1949 $c[
"bt.persistence"] =
function (
$c) {
1953 $c[
"bt.injector"] =
function (
$c) {
1957 $c[
"bt.task_manager"] =
function (
$c) use (
$sync) {
1958 if (
$sync ==
'sync') {
1959 return new \ILIAS\BackgroundTasks\Implementation\TaskManager\SyncTaskManager(
$c[
"bt.persistence"]);
1960 } elseif (
$sync ==
'async') {
1961 return new \ILIAS\BackgroundTasks\Implementation\TaskManager\AsyncTaskManager(
$c[
"bt.persistence"]);
1963 throw new ilException(
"The supported Background Task Managers are sync and async. $sync given.");
1971 $c[
"di.dependency_map"] =
function (
$c) {
1972 return new \ILIAS\BackgroundTasks\Dependencies\DependencyMap\BaseDependencyMap();
1975 $c[
"di.injector"] =
function (
$c) {
1976 return new \ILIAS\BackgroundTasks\Dependencies\Injector(
$c,
$c[
"di.dependency_map"]);
1982 $c[
"service.kiosk_mode"] =
function (
$c) {
const PEAR_ERROR_CALLBACK
static orderBy($orderBy, $orderDirection='ASC')
An exception for terminatinating execution or to throw for unit testing.
Customizing of pimple-DIC for ILIAS.
Implementation of factory for cards.
Implementation of factory for tables.
Renderer that dispatches rendering of UI components to a Renderer found in the same namespace as the ...
Caches renderers loaded by another loader.
Wraps global ilTemplate to provide JavaScriptBinding.
Plumbing for ILIAS, tries to guess.
Factory for wrapped ilTemplates.
Handles display of the main menu for LTI.
special template class to simplify handling of ITX/PEAR
static getInstance(\ilLogger $logger)
Get instance.
static isAuthenticationForced()
Check if authentication is should be forced.
static handleForcedAuthentication()
static usesTemplate()
Uses template engine.
static supportsRedirects()
Are redirects supported?
static hasUser()
Based on user authentication?
static supportsPersistentSessions()
Check if context supports persistent session handling.
static getType()
Get context type.
static hasHTML()
Has HTML output.
static usesHTTP()
Uses HTTP aka browser.
const CONTEXT_LTI_PROVIDER
static initClient()
Init client.
static start()
Start task scheduler for each server instance.
Base class for ILIAS Exception handling.
Class ilGSProviderFactory.
Class ilGlobalCacheSettings.
static setup(ilGlobalCacheSettings $ilGlobalCacheSettings)
static getInstance()
Get https instance.
ILIAS Initialisation Utility Class perform basic setup: init database handler, load configuration fil...
static blockedAuthentication($a_current_script)
Block authentication based on current request.
static initDatabase()
initialise database object $ilDB
static initHTTPServices(\ILIAS\DI\Container $container)
static goToLogin()
go to login
static initILIAS()
ilias initialisation
static initLocale()
Init Locale.
static removeUnsafeCharacters()
Remove unsafe characters from GET.
static buildHTTPPath()
builds http path
static requireCommonIncludes()
get common include code files
static initClientIniFile()
This method provides a global instance of class ilIniFile for the client.ini.php file in variable $il...
static getCurrentCmd()
Extract current cmd from request.
static initSession()
Init auth session.
static initClient()
Init client-based objects (level 1)
static initCore()
Init core objects (level 0)
static recursivelyRemoveUnsafeCharacters($var)
static initUIFramework(\ILIAS\DI\Container $c)
static includePhp5Compliance()
This is a hack for authentication.
static handleErrorReporting()
Set error reporting level.
static initFileUploadService(\ILIAS\DI\Container $dic)
Initializes the file upload service.
static determineClient()
This method determines the current client and sets the constant CLIENT_ID.
static authenticate()
Try authentication.
static translateMessage($a_message_id, array $a_message_static=null)
Translate message if possible.
static redirect($a_target, $a_message_id='', array $a_message_static=null)
Redirects to target url if context supports it.
static initHTML()
init HTML output (level 3)
static initLog()
Init log instance.
static initAvatar(\ILIAS\DI\Container $c)
static goToPublicSection()
go to public section
static resumeUserSession()
Resume an existing user session.
static setSessionHandler()
set session handler to db
static handleDevMode()
Prepare developer tools.
static setCookieConstants()
static showingLoginForm($a_current_script)
Is current view the login form?
static initUser()
Init user / authentification (level 2)
static initKioskMode(\ILIAS\DI\Container $c)
static initGlobal($a_name, $a_class, $a_source_file=null)
Initialize global instance.
static initBackgroundTasks(\ILIAS\DI\Container $c)
static abortAndDie($a_message)
Exit.
static initInjector(\ILIAS\DI\Container $c)
static setSessionCookieParams()
set session cookie params
static initSettings()
initialise $ilSettings object and define constants
static initGlobalScreen(\ILIAS\DI\Container $c)
init the ILIAS UI framework.
static initMail(\ILIAS\DI\Container $c)
static initTermsOfService(\ILIAS\DI\Container $c)
static $already_initialized
static handleMaintenanceMode()
handle maintenance mode
static initAccessHandling()
$ilAccess and $rbac... initialisation
static initCustomObjectIcons(\ILIAS\DI\Container $c)
static initIliasIniFile()
This method provides a global instance of class ilIniFile for the ilias.ini.php file in variable $ilI...
static initStyle()
provide $styleDefinition object
Central entry point for users of the service.
@classDescription class for ILIAS ViewLTI
static getFallbackInstance()
Builds a global default language instance.
static getGlobalInstance()
Builds the global language object.
static getRootLogger()
The unique root logger has a fixed error level.
static getLogger($a_component_id)
Get component logger.
Class ilMailTemplateRepository.
Handles display of the main menu.
static _isAnonymous($usr_id)
Class ilObjectCustomIconFactory.
Administration class for plugins.
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
static getInstance()
Get instance.
Database Session Handling.
static _exists($a_session_id)
Check whether session exists.
static set($a_var, $a_val)
Set a value.
static setClosingContext($a_context)
set closing context (for statistics)
const SESSION_CLOSE_LOGIN
static get($a_var)
Get a value.
const SESSION_CLOSE_PUBLIC
const SESSION_CLOSE_EXPIRE
special template class to simplify handling of ITX/PEAR
Class ilTermsOfServiceCriterionTypeFactory.
Interface ilTermsOfServiceLogicalAndDocumentCriteriaEvaluation.
Interface ilTermsOfServiceSequentialDocumentEvaluation.
static initDefaultTimeZone(ilIniFile $ini)
Initialize default timezone from system settings.
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
Class ilUserAccountMaintenanceEnforcement.
static getStartingPointAsUrl()
Get current starting point setting as URL.
static appendUrlParameterString($a_url, $a_par, $xml_style=false)
append URL parameter string ("par1=value1&par2=value2...") to given URL string
static setCookie($a_cookie_name, $a_cookie_value='', $a_also_set_super_global=true, $a_set_cookie_invalid=false)
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static redirect($a_script)
static getClientIdByString(string $clientId)
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static removeTrailingPathSeparators($path)
Interface FilesystemFactory.
This is how the factory for UI elements looks.
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
catch(Exception $e) $message
if($modEnd===false) $module
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
static http()
Fetches the global http state from ILIAS.
if(array_key_exists('provider', $_GET)) elseif(array_key_exists( 'provider', $_SESSION)) if(!in_array($providerName, ['Google', 'Microsoft', 'Yahoo'])) $clientId
instance(Loop $newLoop=null)
Retrieves or sets the global Loop object.
Class ilCertificateAppEventListener.
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']