16require_once(
"libs/composer/vendor/autoload.php");
20 $GLOBALS[
'ilGlobalStartTime'] = microtime();
23include_once
"Services/Context/classes/class.ilContext.php";
58 foreach ($var as $k => $v) {
66 array(
"\x00",
"\n",
"\r",
"\\",
"'",
'"',
"\x1a"),
80 require_once
"./Services/UICore/classes/class.ilTemplate.php";
84 require_once
"./Services/Utilities/classes/class.ilUtil.php";
85 require_once
"./Services/Calendar/classes/class.ilDatePresentation.php";
86 require_once
"include/inc.ilias_version.php";
88 include_once
'./Services/Authentication/classes/class.ilAuthUtils.php';
90 self::initGlobal(
"ilBench",
"ilBenchmark",
"./Services/Utilities/classes/class.ilBenchmark.php");
100 include_once
'Services/Authentication/classes/class.ilAuthFactory.php';
102 require_once(
"include/inc.xml5compliance.php");
104 require_once(
"include/inc.xsl5compliance.php");
116 require_once(
"./Services/Init/classes/class.ilIniFile.php");
122 define(
"ILIAS_DATA_DIR",
$ilIliasIniFile->readVariable(
"clients",
"datadir"));
123 define(
"ILIAS_WEB_DIR",
$ilIliasIniFile->readVariable(
"clients",
"path"));
124 define(
"ILIAS_ABSOLUTE_PATH",
$ilIliasIniFile->readVariable(
'server',
'absolute_path'));
128 define(
"ILIAS_LOG_FILE",
$ilIliasIniFile->readVariable(
"log",
"file"));
129 define(
"ILIAS_LOG_ENABLED",
$ilIliasIniFile->readVariable(
"log",
"enabled"));
130 define(
"ILIAS_LOG_LEVEL",
$ilIliasIniFile->readVariable(
"log",
"level"));
131 define(
"SLOW_REQUEST_TIME",
$ilIliasIniFile->readVariable(
"log",
"slow_request_time"));
134 define(
"PATH_TO_CONVERT",
$ilIliasIniFile->readVariable(
"tools",
"convert"));
135 define(
"PATH_TO_FFMPEG",
$ilIliasIniFile->readVariable(
"tools",
"ffmpeg"));
137 define(
"PATH_TO_MKISOFS",
$ilIliasIniFile->readVariable(
"tools",
"mkisofs"));
138 define(
"PATH_TO_UNZIP",
$ilIliasIniFile->readVariable(
"tools",
"unzip"));
139 define(
"PATH_TO_GHOSTSCRIPT",
$ilIliasIniFile->readVariable(
"tools",
"ghostscript"));
140 define(
"PATH_TO_JAVA",
$ilIliasIniFile->readVariable(
"tools",
"java"));
141 define(
"URL_TO_LATEX",
$ilIliasIniFile->readVariable(
"tools",
"latex"));
143 define(
"PATH_TO_LESSC",
$ilIliasIniFile->readVariable(
"tools",
"lessc"));
144 define(
"PATH_TO_PHANTOMJS",
$ilIliasIniFile->readVariable(
"tools",
"phantomjs"));
148 define(
"ERROR_EDITOR_URL",
$ilIliasIniFile->readVariable(
'error',
'editor_url'));
151 if (
$ilIliasIniFile->variableExists(
'error',
'editor_path_translations')) {
152 define(
"ERROR_EDITOR_PATH_TRANSLATIONS",
$ilIliasIniFile->readVariable(
'error',
'editor_path_translations'));
159 define(
"IL_VIRUS_SCANNER",
"Sophos");
160 define(
"IL_VIRUS_SCAN_COMMAND",
$ilIliasIniFile->readVariable(
"tools",
"scancommand"));
161 define(
"IL_VIRUS_CLEAN_COMMAND",
$ilIliasIniFile->readVariable(
"tools",
"cleancommand"));
165 define(
"IL_VIRUS_SCANNER",
"AntiVir");
166 define(
"IL_VIRUS_SCAN_COMMAND",
$ilIliasIniFile->readVariable(
"tools",
"scancommand"));
167 define(
"IL_VIRUS_CLEAN_COMMAND",
$ilIliasIniFile->readVariable(
"tools",
"cleancommand"));
171 define(
"IL_VIRUS_SCANNER",
"ClamAV");
172 define(
"IL_VIRUS_SCAN_COMMAND",
$ilIliasIniFile->readVariable(
"tools",
"scancommand"));
173 define(
"IL_VIRUS_CLEAN_COMMAND",
$ilIliasIniFile->readVariable(
"tools",
"cleancommand"));
177 define(
"IL_VIRUS_SCANNER",
"None");
181 include_once
'./Services/Calendar/classes/class.ilTimeZone.php';
183 define(
"IL_TIMEZONE",
$tz);
197 public static function bootstrapFilesystems()
201 $DIC[
'filesystem.security.sanitizing.filename'] =
function (
$c) {
205 $DIC[
'filesystem.factory'] =
function (
$c) {
206 return new \ILIAS\Filesystem\Provider\DelegatingFilesystemFactory(
$c[
'filesystem.security.sanitizing.filename']);
209 $DIC[
'filesystem.web'] =
function (
$c) {
215 $delegatingFactory =
$c[
'filesystem.factory'];
216 $webConfiguration = new \ILIAS\Filesystem\Provider\Configuration\LocalConfig(ILIAS_ABSOLUTE_PATH .
'/' . ILIAS_WEB_DIR .
'/' . CLIENT_ID);
217 return $delegatingFactory->getLocal($webConfiguration);
220 $DIC[
'filesystem.storage'] =
function (
$c) {
226 $delegatingFactory =
$c[
'filesystem.factory'];
227 $storageConfiguration = new \ILIAS\Filesystem\Provider\Configuration\LocalConfig(ILIAS_DATA_DIR .
'/' . CLIENT_ID);
228 return $delegatingFactory->getLocal($storageConfiguration);
231 $DIC[
'filesystem.temp'] =
function (
$c) {
237 $delegatingFactory =
$c[
'filesystem.factory'];
238 $tempConfiguration = new \ILIAS\Filesystem\Provider\Configuration\LocalConfig(ILIAS_DATA_DIR .
'/' . CLIENT_ID .
'/temp');
239 return $delegatingFactory->getLocal($tempConfiguration);
242 $DIC[
'filesystem.customizing'] =
function (
$c) {
248 $delegatingFactory =
$c[
'filesystem.factory'];
249 $customizingConfiguration = new \ILIAS\Filesystem\Provider\Configuration\LocalConfig(ILIAS_ABSOLUTE_PATH .
'/' .
'Customizing');
250 return $delegatingFactory->getLocal($customizingConfiguration);
253 $DIC[
'filesystem.libs'] =
function (
$c) {
259 $delegatingFactory =
$c[
'filesystem.factory'];
260 $customizingConfiguration = new \ILIAS\Filesystem\Provider\Configuration\LocalConfig(ILIAS_ABSOLUTE_PATH .
'/' .
'libs');
261 return $delegatingFactory->getLocal($customizingConfiguration,
true);
264 $DIC[
'filesystem'] =
function (
$c) {
265 return new \ILIAS\Filesystem\FilesystemsImpl(
266 $c[
'filesystem.storage'],
267 $c[
'filesystem.web'],
268 $c[
'filesystem.temp'],
269 $c[
'filesystem.customizing'],
270 $c[
'filesystem.libs']
286 $dic[
'upload.processor-manager'] =
function (
$c) {
291 $fileUploadImpl = new \ILIAS\FileUpload\FileUploadImpl(
$c[
'upload.processor-manager'],
$c[
'filesystem'],
$c[
'http']);
292 if (IL_VIRUS_SCANNER !=
"None") {
300 return $fileUploadImpl;
309 include_once
'./Services/Http/classes/class.ilHTTPS.php';
312 if (
$https->isDetected()) {
313 $protocol =
'https://';
315 $protocol =
'http://';
319 $rq_uri = strip_tags(
$_SERVER[
'REQUEST_URI']);
323 if (is_int($pos = strpos($rq_uri,
"?"))) {
324 $rq_uri = substr($rq_uri, 0, $pos);
327 if (!defined(
'ILIAS_MODULE')) {
328 $path = pathinfo($rq_uri);
329 if (!$path[
'extension']) {
332 $uri = dirname($rq_uri);
336 $path = dirname($rq_uri);
341 $dirs = explode(
'/', $module);
343 foreach ($dirs as $dir) {
344 $uri = dirname($uri);
357 $f = new \ILIAS\Data\Factory();
360 return define(
'ILIAS_HTTP_PATH', $uri->getBaseURI());
373 self::abortAndDie(
'Fatal Error: ilInitialisation::determineClient called without initialisation of ILIAS ini file object.');
376 if (isset(
$_GET[
'client_id']) && strlen(
$_GET[
'client_id']) > 0) {
378 if (!defined(
'IL_PHPUNIT_TEST')) {
383 } elseif (!isset(
$_COOKIE[
'ilClientId'])) {
390 $clientId =
$_GET[
'client_id'];
413 if (ILIAS_WEB_DIR ==
"") {
414 self::abortAndDie(
"Fatal Error: ilInitialisation::initClientIniFile called without ILIAS_WEB_DIR.");
418 if (CLIENT_ID ==
"") {
419 self::abortAndDie(
"Fatal Error: ilInitialisation::initClientIniFile called without CLIENT_ID.");
422 $ini_file =
"./" . ILIAS_WEB_DIR .
"/" . CLIENT_ID .
"/client.ini.php";
425 $ilClientIniFile =
new ilIniFile($ini_file);
426 $ilClientIniFile->read();
429 if ($ilClientIniFile->ERROR !=
"") {
433 if (CLIENT_ID !=
"" && CLIENT_ID != $default_client) {
434 $mess = array(
"en" =>
"Client does not exist.",
435 "de" =>
"Mandant ist ungültig.");
436 self::redirect(
"index.php?client_id=" . $default_client,
null, $mess);
438 self::abortAndDie(
"Fatal Error: ilInitialisation::initClientIniFile initializing client ini file abborted with: " . $ilClientIniFile->ERROR);
445 define(
"SESSION_REMINDER_LEADTIME", 30);
446 define(
"DEBUG", $ilClientIniFile->readVariable(
"system",
"DEBUG"));
447 define(
"DEVMODE", $ilClientIniFile->readVariable(
"system",
"DEVMODE"));
448 define(
"SHOWNOTICES", $ilClientIniFile->readVariable(
"system",
"SHOWNOTICES"));
449 define(
"DEBUGTOOLS", $ilClientIniFile->readVariable(
"system",
"DEBUGTOOLS"));
450 define(
"ROOT_FOLDER_ID", $ilClientIniFile->readVariable(
'system',
'ROOT_FOLDER_ID'));
451 define(
"SYSTEM_FOLDER_ID", $ilClientIniFile->readVariable(
'system',
'SYSTEM_FOLDER_ID'));
452 define(
"ROLE_FOLDER_ID", $ilClientIniFile->readVariable(
'system',
'ROLE_FOLDER_ID'));
453 define(
"MAIL_SETTINGS_ID", $ilClientIniFile->readVariable(
'system',
'MAIL_SETTINGS_ID'));
454 $error_handler = $ilClientIniFile->readVariable(
'system',
'ERROR_HANDLER');
455 define(
"ERROR_HANDLER", $error_handler ? $error_handler :
"PRETTY_PAGE");
459 define(
"OH_REF_ID", $ilClientIniFile->readVariable(
"system",
"OH_REF_ID"));
461 define(
"SYSTEM_MAIL_ADDRESS", $ilClientIniFile->readVariable(
'system',
'MAIL_SENT_ADDRESS'));
462 define(
"MAIL_REPLY_WARNING", $ilClientIniFile->readVariable(
'system',
'MAIL_REPLY_WARNING'));
468 define(
"CLIENT_DATA_DIR", ILIAS_DATA_DIR .
"/" . CLIENT_ID);
469 define(
"CLIENT_WEB_DIR", ILIAS_ABSOLUTE_PATH .
"/" . ILIAS_WEB_DIR .
"/" . CLIENT_ID);
470 define(
"CLIENT_NAME", $ilClientIniFile->readVariable(
'client',
'name'));
472 $val = $ilClientIniFile->readVariable(
"db",
"type");
474 define(
"IL_DB_TYPE",
"mysql");
476 define(
"IL_DB_TYPE", $val);
480 $ilGlobalCacheSettings->readFromIniFile($ilClientIniFile);
491 global $ilClientIniFile;
493 if (!$ilClientIniFile->readVariable(
"client",
"access")) {
495 "en" =>
"The server is not available due to maintenance." .
496 " We apologise for any inconvenience.",
497 "de" =>
"Der Server ist aufgrund von Wartungsarbeiten nicht verfügbar." .
498 " Wir bitten um Verständnis."
500 $mess_id =
"init_error_maintenance";
519 $ilDB->initFromIniFile();
532 if (ini_get(
'session.save_handler') !=
'user' && version_compare(PHP_VERSION,
'7.2.0',
'<')) {
533 ini_set(
"session.save_handler",
"user");
536 require_once
"Services/Authentication/classes/class.ilSessionDBHandler.php";
538 if (!$db_session_handler->setSaveHandler()) {
539 self::abortAndDie(
"Please turn off Safe mode OR set session.save_handler to \"user\" in your php.ini");
545 if (function_exists(
"session_status") && session_status() == PHP_SESSION_ACTIVE) {
546 session_regenerate_id();
556 include_once
'Services/Authentication/classes/class.ilAuthFactory.php';
559 } elseif (
$GLOBALS[
'COOKIE_PATH']) {
577 define(
'IL_COOKIE_HTTPONLY',
true);
578 define(
'IL_COOKIE_EXPIRE', 0);
580 define(
'IL_COOKIE_DOMAIN',
'');
590 if (!defined(
'IL_COOKIE_SECURE')) {
594 include_once
'./Services/Http/classes/class.ilHTTPS.php';
596 define(
'IL_COOKIE_SECURE', $cookie_secure);
598 session_set_cookie_params(
614 return new \ilMailMimeTransportFactory(
$c->settings(),
$c->event());
617 return new \ilMailMimeSenderFactory(
$c->settings());
629 $c[
"object.customicons.factory"] =
function (
$c) {
630 require_once
'Services/Object/Icon/classes/class.ilObjectCustomIconFactory.php';
632 $c->filesystem()->web(),
644 $c[
"user.avatar.factory"] =
function (
$c) {
645 return new \ilUserAvatarFactory(
$c);
661 $c[
'tos.criteria.type.factory'],
681 $c[
'acc.criteria.type.factory'],
704 "Services/Administration/classes/class.ilSetting.php"
713 define(
"ANONYMOUS_USER_ID",
$ilSetting->get(
"anonymous_user_id"));
714 define(
"ANONYMOUS_ROLE_ID",
$ilSetting->get(
"anonymous_role_id"));
715 define(
"SYSTEM_USER_ID",
$ilSetting->get(
"system_user_id"));
716 define(
"SYSTEM_ROLE_ID",
$ilSetting->get(
"system_role_id"));
717 define(
"USER_FOLDER_ID", 7);
720 define(
"RECOVERY_FOLDER_ID",
$ilSetting->get(
"recovery_folder_id"));
723 define(
"IL_INST_ID",
$ilSetting->get(
"inst_id", 0));
726 define(
"SUFFIX_REPL_DEFAULT",
"php,php3,php4,inc,lang,phtml,htaccess");
727 define(
"SUFFIX_REPL_ADDITIONAL",
$ilSetting->get(
"suffix_repl_additional"));
739 global
$DIC, $ilPluginAdmin;
745 "./Services/Style/System/classes/class.ilStyleDefinition.php"
749 $pl_names = $ilPluginAdmin->getActivePluginsForSlot(
IL_COMP_SERVICE,
"UIComponent",
"uihk");
750 foreach ($pl_names as $pl) {
752 $gui_class = $ui_plugin->getUIClassInstance();
753 $gui_class->modifyGUI(
"Services/Init",
"init_style", array(
"styleDefinition" =>
$DIC->systemStyle()));
764 static $context_init;
766 $uid =
$GLOBALS[
'DIC'][
'ilAuthSession']->getUserId();
768 $DIC->user()->setId($uid);
769 $DIC->user()->read();
770 if (!isset($context_init)) {
771 if (
$DIC->user()->isAnonymous()) {
772 $DIC->globalScreen()->tool()->context()->claim()->external();
774 $DIC->globalScreen()->tool()->context()->claim()->internal();
776 $context_init =
true;
780 \ilOnlineTracking::updateAccess(
$DIC->user());
797 $larr = explode(
",", trim(
$ilSetting->get(
"locale")));
800 foreach ($larr as $l) {
801 if (trim($l) !=
"") {
805 if (count($ls) > 0) {
806 setlocale(LC_ALL, $ls);
809 setlocale(LC_NUMERIC,
"C");
811 if (class_exists(
"Collator")) {
812 $GLOBALS[
"ilCollator"] =
new Collator($first);
813 $GLOBALS[
"DIC"][
"ilCollator"] =
function (
$c) {
830 if (ANONYMOUS_USER_ID ==
"") {
834 $session_destroyed =
false;
835 if (
$GLOBALS[
'DIC'][
'ilAuthSession']->isExpired()) {
836 $session_destroyed =
true;
839 if (!
$GLOBALS[
'DIC'][
'ilAuthSession']->isAuthenticated()) {
840 $session_destroyed =
true;
844 if ($session_destroyed) {
845 $GLOBALS[
'DIC'][
'ilAuthSession']->setAuthenticated(
true, ANONYMOUS_USER_ID);
851 if (strlen(
$_GET[
"target"])) {
853 $current_script = substr(strrchr(
$_SERVER[
"PHP_SELF"],
"/"), 1);
854 if ($current_script ==
"goto.php") {
862 #if(!$GLOBALS['DIC']->rbac()->system()->checkAccess('read', ROOT_FOLDER_ID))
864 # return self::goToLogin();
868 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
869 $_GET[
"cmd"] =
"frameset";
871 "ilias.php?baseClass=ilrepositorygui&reloadpublic=1&cmd=" .
885 if (
$GLOBALS[
'DIC'][
'ilAuthSession']->isExpired()) {
888 if (!
$GLOBALS[
'DIC'][
'ilAuthSession']->isAuthenticated()) {
892 $script =
"login.php?target=" .
$_GET[
"target"] .
"&client_id=" .
$_COOKIE[
"ilClientId"] .
893 "&auth_stat=" . $a_auth_stat;
897 "init_error_authentication_fail",
899 "en" =>
"Authentication failed.",
900 "de" =>
"Authentifizierung fehlgeschlagen.")
907 protected static function initLanguage($a_use_user_language =
true)
916 require_once
'Services/Language/classes/class.ilLanguage.php';
918 if ($a_use_user_language) {
919 if (
$DIC->offsetExists(
'lng')) {
920 $DIC->offsetUnset(
'lng');
926 if (is_object($rbacsystem) &&
$DIC->offsetExists(
'tree')) {
927 $rbacsystem->initMemberView();
939 "./Services/AccessControl/classes/class.ilRbacReview.php"
942 require_once
"./Services/AccessControl/classes/class.ilRbacSystem.php";
949 "./Services/AccessControl/classes/class.ilRbacAdmin.php"
955 "./Services/AccessControl/classes/class.ilAccess.php"
958 require_once
"./Services/Conditions/classes/class.ilConditionHandler.php";
966 include_once
'./Services/Logging/classes/public/class.ilLoggerFactory.php';
981 protected static function initGlobal($a_name, $a_class, $a_source_file =
null)
985 if ($a_source_file) {
986 include_once $a_source_file;
992 $DIC[$a_name] =
function (
$c) use ($a_name) {
1004 if (is_object(
$GLOBALS[
'ilLog'])) {
1005 $GLOBALS[
'ilLog']->write(
"Fatal Error: ilInitialisation - " . $a_message);
1016 if (defined(SHOWNOTICES) && SHOWNOTICES) {
1021 error_reporting(E_ALL);
1024 if (defined(
'DEBUGTOOLS') && DEBUGTOOLS) {
1025 include_once
"include/inc.debug.php";
1034 self::$already_initialized =
false;
1043 if (self::$already_initialized) {
1047 $GLOBALS[
"DIC"] = new \ILIAS\DI\Container();
1048 $GLOBALS[
"DIC"][
"ilLoggerFactory"] =
function (
$c) {
1052 self::$already_initialized =
true;
1073 self::initLanguage(
true);
1074 $GLOBALS[
'DIC'][
'tree']->initLangCode();
1092 $GLOBALS[
"DIC"][
"ilAuthSession"] =
function (
$c) {
1094 $c[
'ilLoggerFactory']->getLogger(
'auth')
1096 $auth_session->init();
1097 return $auth_session;
1108 error_reporting(E_ALL & ~E_NOTICE);
1133 "./Services/Init/classes/class.ilErrorHandling.php"
1141 include_once
"Services/Authentication/classes/class.ilSession.php";
1150 define(
'IL_INITIAL_WD', getcwd());
1153 self::initGlobal(
"ilias",
"ILIAS",
"./Services/Init/classes/class.ilias.php");
1167 self::bootstrapFilesystems();
1174 $ilias->client_id = CLIENT_ID;
1186 self::initLanguage(
false);
1192 "ilAppEventHandler",
1193 "ilAppEventHandler",
1194 "./Services/EventHandling/classes/class.ilAppEventHandler.php"
1206 "./Services/Component/classes/class.ilPluginAdmin.php"
1225 self::initGlobal(
"https",
"ilHTTPS",
"./Services/Http/classes/class.ilHTTPS.php");
1226 $https->enableSecureCookies();
1235 "ilObjectDataCache",
1236 "./Services/Object/classes/class.ilObjectDataCache.php"
1240 require_once
"./Services/Xml/classes/class.ilSaxParser.php";
1244 "ilObjectDefinition",
1245 "./Services/Object/classes/class.ilObjectDefinition.php"
1249 require_once
"./Services/Tree/classes/class.ilTree.php";
1250 $tree =
new ilTree(ROOT_FOLDER_ID);
1257 "./Services/UICore/classes/class.ilCtrl.php"
1277 "./Services/User/classes/class.ilObjUser.php"
1295 !
$GLOBALS[
'DIC'][
'ilAuthSession']->isAuthenticated() or
1296 $GLOBALS[
'DIC'][
'ilAuthSession']->isExpired()
1299 $current_script = substr(strrchr(
$_SERVER[
"PHP_SELF"],
"/"), 1);
1300 if (self::blockedAuthentication($current_script)) {
1306 return self::handleAuthenticationFail();
1316 protected static function handleAuthenticationSuccess()
1323 require_once
'Services/Tracking/classes/class.ilOnlineTracking.php';
1324 ilOnlineTracking::updateAccess(
$ilUser);
1330 protected static function handleAuthenticationFail()
1344 throw new Exception(
"Authentication failed.");
1347 $GLOBALS[
'DIC'][
'ilAuthSession']->isExpired() &&
1368 return new \ILIAS\HTTP\Request\RequestFactoryImpl();
1372 return new \ILIAS\HTTP\Response\ResponseFactoryImpl();
1375 $container[
'http.cookie_jar_factory'] =
function (
$c) {
1376 return new \ILIAS\HTTP\Cookies\CookieJarFactoryImpl();
1379 $container[
'http.response_sender_strategy'] =
function (
$c) {
1380 return new \ILIAS\HTTP\Response\Sender\DefaultResponseSenderStrategy();
1384 return new \ILIAS\DI\HTTPServices(
1385 $c[
'http.response_sender_strategy'],
1386 $c[
'http.cookie_jar_factory'],
1387 $c[
'http.request_factory'],
1388 $c[
'http.response_factory']
1399 $c[
'global_screen'] =
function () use (
$c) {
1402 $c->globalScreen()->tool()->context()->stack()->clear();
1403 $c->globalScreen()->tool()->context()->claim()->main();
1412 $c[
"ui.factory"] =
function (
$c) {
1413 $c[
"lng"]->loadLanguageModule(
"ui");
1415 $c[
"ui.factory.counter"],
1416 $c[
"ui.factory.button"],
1417 $c[
"ui.factory.listing"],
1418 $c[
"ui.factory.image"],
1419 $c[
"ui.factory.panel"],
1420 $c[
"ui.factory.modal"],
1421 $c[
"ui.factory.dropzone"],
1422 $c[
"ui.factory.popover"],
1423 $c[
"ui.factory.divider"],
1424 $c[
"ui.factory.link"],
1425 $c[
"ui.factory.dropdown"],
1426 $c[
"ui.factory.item"],
1427 $c[
"ui.factory.viewcontrol"],
1428 $c[
"ui.factory.chart"],
1429 $c[
"ui.factory.input"],
1430 $c[
"ui.factory.table"],
1431 $c[
"ui.factory.messagebox"],
1432 $c[
"ui.factory.card"],
1433 $c[
"ui.factory.layout"],
1434 $c[
"ui.factory.maincontrols"],
1435 $c[
"ui.factory.tree"],
1436 $c[
"ui.factory.menu"],
1437 $c[
"ui.factory.symbol"],
1438 $c[
"ui.factory.legacy"]
1441 $c[
"ui.signal_generator"] =
function (
$c) {
1444 $c[
"ui.factory.counter"] =
function (
$c) {
1447 $c[
"ui.factory.button"] =
function (
$c) {
1450 $c[
"ui.factory.listing"] =
function (
$c) {
1453 $c[
"ui.factory.image"] =
function (
$c) {
1456 $c[
"ui.factory.panel"] =
function (
$c) {
1459 $c[
"ui.factory.modal"] =
function (
$c) {
1462 $c[
"ui.factory.dropzone"] =
function (
$c) {
1465 $c[
"ui.factory.popover"] =
function (
$c) {
1468 $c[
"ui.factory.divider"] =
function (
$c) {
1471 $c[
"ui.factory.link"] =
function (
$c) {
1474 $c[
"ui.factory.dropdown"] =
function (
$c) {
1477 $c[
"ui.factory.item"] =
function (
$c) {
1480 $c[
"ui.factory.viewcontrol"] =
function (
$c) {
1483 $c[
"ui.factory.chart"] =
function (
$c) {
1486 $c[
"ui.factory.input"] =
function (
$c) {
1488 $c[
"ui.signal_generator"],
1489 $c[
"ui.factory.input.field"],
1490 $c[
"ui.factory.input.container"]
1493 $c[
"ui.factory.table"] =
function (
$c) {
1496 $c[
"ui.factory.messagebox"] =
function (
$c) {
1499 $c[
"ui.factory.card"] =
function (
$c) {
1502 $c[
"ui.factory.layout"] =
function (
$c) {
1505 $c[
"ui.factory.maincontrols.slate"] =
function (
$c) {
1507 $c[
'ui.signal_generator'],
1508 $c[
'ui.factory.counter'],
1509 $c[
"ui.factory.symbol"]
1512 $c[
"ui.factory.maincontrols"] =
function (
$c) {
1514 $c[
'ui.signal_generator'],
1515 $c[
'ui.factory.maincontrols.slate']
1518 $c[
"ui.factory.menu"] =
function (
$c) {
1521 $c[
"ui.factory.symbol.glyph"] =
function (
$c) {
1524 $c[
"ui.factory.symbol.icon"] =
function (
$c) {
1527 $c[
"ui.factory.symbol.avatar"] =
function (
$c) {
1530 $c[
"ui.factory.symbol"] =
function (
$c) {
1532 $c[
"ui.factory.symbol.icon"],
1533 $c[
"ui.factory.symbol.glyph"],
1534 $c[
"ui.factory.symbol.avatar"]
1537 $c[
"ui.factory.progressmeter"] =
function (
$c) {
1540 $c[
"ui.factory.dropzone.file"] =
function (
$c) {
1543 $c[
"ui.factory.input.field"] =
function (
$c) {
1548 $c[
"ui.signal_generator"],
1554 $c[
"ui.factory.input.container"] =
function (
$c) {
1556 $c[
"ui.factory.input.container.form"],
1557 $c[
"ui.factory.input.container.filter"]
1560 $c[
"ui.factory.input.container.form"] =
function (
$c) {
1562 $c[
"ui.factory.input.field"]
1565 $c[
"ui.factory.input.container.filter"] =
function (
$c) {
1567 $c[
"ui.signal_generator"],
1568 $c[
"ui.factory.input.field"]
1571 $c[
"ui.factory.panel.listing"] =
function (
$c) {
1575 $c[
"ui.renderer"] =
function (
$c) {
1577 $c[
"ui.component_renderer_loader"]
1580 $c[
"ui.component_renderer_loader"] =
function (
$c) {
1582 new ILIAS\
UI\Implementation\Render\LoaderResourceRegistryWrapper(
1583 $c[
"ui.resource_registry"],
1584 new ILIAS\
UI\Implementation\Render\FSLoader(
1585 new ILIAS\
UI\Implementation\Render\DefaultRendererFactory(
1587 $c[
"ui.template_factory"],
1589 $c[
"ui.javascript_binding"],
1592 new ILIAS\
UI\Implementation\Component\Symbol\Glyph\GlyphRendererFactory(
1594 $c[
"ui.template_factory"],
1596 $c[
"ui.javascript_binding"],
1599 new ILIAS\
UI\Implementation\Component\Input\Field\FieldRendererFactory(
1601 $c[
"ui.template_factory"],
1603 $c[
"ui.javascript_binding"],
1610 $c[
"ui.template_factory"] =
function (
$c) {
1615 $c[
"ui.resource_registry"] =
function (
$c) {
1618 $c[
"ui.javascript_binding"] =
function (
$c) {
1622 $c[
"ui.factory.tree"] =
function (
$c) {
1626 $c[
"ui.factory.legacy"] =
function (
$c) {
1631 foreach ($plugins as $plugin_data) {
1634 $c[
'ui.renderer'] =
$plugin->exchangeUIRendererAfterInitialization(
$c);
1636 foreach (
$c->keys() as $key) {
1637 if (strpos($key,
"ui.factory") === 0) {
1638 $c[$key] =
$plugin->exchangeUIFactoryAfterInitialization($key,
$c);
1650 $dataFactory = new \ILIAS\Data\Factory();
1653 return new \ILIAS\Refinery\Factory($dataFactory, $language);
1680 $request_adjuster->adjust();
1683 require_once
"./Services/UICore/classes/class.ilFrameTargetInfo.php";
1686 "ilNavigationHistory",
1687 "ilNavigationHistory",
1688 "Services/Navigation/classes/class.ilNavigationHistory.php"
1694 "./Services/Utilities/classes/class.ilBrowser.php"
1700 "Services/Help/classes/class.ilHelpGUI.php"
1706 "./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php"
1712 "./Services/Locator/classes/class.ilLocatorGUI.php"
1718 "./Services/UIComponent/Tabs/classes/class.ilTabsGUI.php"
1722 include_once
'./Services/MainMenu/classes/class.ilMainMenuGUI.php';
1731 $_GET[
'limit'] = (int)
$ilUser->getPref(
'hits_per_page');
1740 if (isset(
$_GET[
'offset']) &&
$_GET[
'offset'] !=
"") {
1744 self::initGlobal(
"lti",
"ilLTIViewGUI",
"./Services/LTI/classes/class.ilLTIViewGUI.php");
1749 include_once
"Services/User/classes/class.ilObjUser.php";
1760 $cmd = $_REQUEST[
"cmd"];
1761 if (is_array($cmd)) {
1762 return array_shift(array_keys($cmd));
1800 $a_current_script ==
"register.php" ||
1801 $a_current_script ==
"pwassist.php" ||
1802 $a_current_script ==
"confirmReg.php" ||
1803 $a_current_script ==
"il_securimage_play.php" ||
1804 $a_current_script ==
"il_securimage_show.php" ||
1805 $a_current_script ==
'login.php'
1811 $requestBaseClass = strtolower($_REQUEST[
'baseClass']);
1812 if ($requestBaseClass == strtolower(ilStartUpGUI::class)) {
1813 $requestCmdClass = strtolower($_REQUEST[
'cmdClass']);
1815 $requestCmdClass == strtolower(ilAccountRegistrationGUI::class) ||
1816 $requestCmdClass == strtolower(ilPasswordAssistanceGUI::class)
1823 $cmd ==
"showTermsOfService" || $cmd ==
"showClientList" ||
1824 $cmd ==
'showAccountMigration' || $cmd ==
'migrateAccount' ||
1825 $cmd ==
'processCode' || $cmd ==
'showLoginPage' || $cmd ==
'showLogout' ||
1826 $cmd ==
'doStandardAuthentication' || $cmd ==
'doCasAuthentication'
1834 if (($a_current_script ==
"goto.php" &&
$_GET[
"target"] ==
"impr_0") ||
1835 strtolower(
$_GET[
"baseClass"]) == strtolower(ilImprintGUI::class)) {
1840 if ($a_current_script ==
'goto.php' && in_array(
$_GET[
'target'], array(
1841 'usr_registration',
'usr_nameassist',
'usr_pwassist',
'usr_agreement'
1866 } elseif ($_REQUEST[
"lang"]) {
1867 $lang = (string) $_REQUEST[
"lang"];
1870 } elseif ($ilClientIniFile) {
1871 $lang = $ilClientIniFile->readVariable(
"language",
"default");
1878 if (
$ilDB && $a_message_id) {
1880 require_once
"./Services/Language/classes/class.ilLanguage.php";
1884 $lng->loadLanguageModule(
"init");
1886 } elseif (is_array($a_message_static)) {
1887 if (!isset($a_message_static[
$lang])) {
1902 protected static function redirect($a_target, $a_message_id =
'', array $a_message_static =
null)
1905 if (defined(
"ILIAS_HTTP_PATH") &&
1910 foreach ([
'ext_uid',
'soap_pw'] as
$param) {
1911 if (
false === strpos($a_target,
$param .
'=') && isset(
$GLOBALS[
'DIC']->
http()->request()->getQueryParams()[
$param])) {
1926 "init_error_redirect_click",
1927 array(
"en" =>
'Please click to continue.',
1928 "de" =>
'Bitte klicken um fortzufahren.')
1931 '<br /><a href="' . $a_target .
'">' . $link .
'</a>';
1940 "init_error_redirect_info",
1941 array(
"en" =>
'Redirect not supported by context.',
1942 "de" =>
'Weiterleitungen werden durch Kontext nicht unterstützt.')
1944 ' (' . $a_target .
')';
1955 public static function redirectToStartingPage()
1963 if (
$ilUser->getId() == ANONYMOUS_USER_ID) {
1970 if (!
$_GET[
"target"]) {
1973 include_once
'./Services/User/classes/class.ilUserUtil.php';
1986 $n_of_tasks =
$ilIliasIniFile->readVariable(
"background_tasks",
"number_of_concurrent_tasks");
1987 $sync =
$ilIliasIniFile->readVariable(
"background_tasks",
"concurrency");
1989 $n_of_tasks = $n_of_tasks ? $n_of_tasks : 5;
1990 $sync = $sync ? $sync :
'sync';
1992 $c[
"bt.task_factory"] =
function (
$c) {
1993 return new \ILIAS\BackgroundTasks\Implementation\Tasks\BasicTaskFactory(
$c[
"di.injector"]);
1996 $c[
"bt.persistence"] =
function (
$c) {
1997 return BasicPersistence::instance();
2000 $c[
"bt.injector"] =
function (
$c) {
2004 $c[
"bt.task_manager"] =
function (
$c) use ($sync) {
2005 if ($sync ==
'sync') {
2006 return new \ILIAS\BackgroundTasks\Implementation\TaskManager\SyncTaskManager(
$c[
"bt.persistence"]);
2007 } elseif ($sync ==
'async') {
2008 return new \ILIAS\BackgroundTasks\Implementation\TaskManager\AsyncTaskManager(
$c[
"bt.persistence"]);
2010 throw new ilException(
"The supported Background Task Managers are sync and async. $sync given.");
2018 $c[
"di.dependency_map"] =
function (
$c) {
2019 return new \ILIAS\BackgroundTasks\Dependencies\DependencyMap\BaseDependencyMap();
2022 $c[
"di.injector"] =
function (
$c) {
2023 return new \ILIAS\BackgroundTasks\Dependencies\Injector(
$c,
$c[
"di.dependency_map"]);
2029 $c[
"service.kiosk_mode"] =
function (
$c) {
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
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.
Class BlacklistExtensionPreProcessor PreProcessor which denies all blacklisted file extensions.
Class FilenameSanitizerPreProcessor.
Class InsecureFilenameSanitizerPreProcessor.
Class PreProcessorManagerImpl.
Class VirusScannerPreProcessor.
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.
Class ilAccessibilityCriterionTypeFactory.
Class ilAccessibilityLogicalAndDocumentCriteriaEvaluation.
Interface ilAccessibilitySequentialDocumentEvaluation.
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 getWrapper($a_type)
Base class for ILIAS Exception handling.
static getExplicitlyBlockedFiles()
Class ilGSProviderFactory.
Class ilGlobalCacheSettings.
static setup(ilGlobalCacheSettings $ilGlobalCacheSettings)
Class ilGlobalPageTemplate.
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)
init the ILIAS UI framework.
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 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 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)
static initMail(\ILIAS\DI\Container $c)
static initTermsOfService(\ILIAS\DI\Container $c)
static initRefinery(\ILIAS\DI\Container $container)
static initAccessibilityControlConcept(\ILIAS\DI\Container $c)
static $already_initialized
static handleMaintenanceMode()
handle maintenance mode
static initAccessHandling()
$ilAccess and $rbac... initialisation
static initUserAccount()
Init user with current account id.
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.
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 getActivePlugins()
Get info for all active plugins.
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
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 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 what a factory for layouts looks like.
This is how the factory for UI elements looks.
static http()
Fetches the global http state from ILIAS.
Class ChatMainBarProvider \MainMenu\Provider.
Class ilAsqQuestionAuthoringFactory.
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl