4 require_once(
"libs/composer/vendor/autoload.php");
9 $GLOBALS[
'ilGlobalStartTime'] = microtime();
12 include_once
"Services/Context/classes/class.ilContext.php";
40 $_GET = self::recursivelyRemoveUnsafeCharacters(
$_GET);
46 foreach ($var as $k => $v) {
47 $k = self::recursivelyRemoveUnsafeCharacters($k);
48 $mod[$k] = self::recursivelyRemoveUnsafeCharacters($v);
54 array(
"\x00",
"\n",
"\r",
"\\",
"'",
'"',
"\x1a"),
69 require_once
"./Services/UICore/classes/class.ilTemplate.php";
73 require_once
"./Services/Utilities/classes/class.ilUtil.php";
74 require_once
"./Services/Calendar/classes/class.ilDatePresentation.php";
75 require_once
"include/inc.ilias_version.php";
77 include_once
'./Services/Authentication/classes/class.ilAuthUtils.php';
79 self::initGlobal(
"ilBench",
"ilBenchmark",
"./Services/Utilities/classes/class.ilBenchmark.php");
89 include_once
'Services/Authentication/classes/class.ilAuthFactory.php';
92 require_once(
"include/inc.xml5compliance.php");
94 require_once(
"include/inc.xsl5compliance.php");
106 require_once(
"./Services/Init/classes/class.ilIniFile.php");
112 define(
"ILIAS_DATA_DIR",
$ilIliasIniFile->readVariable(
"clients",
"datadir"));
113 define(
"ILIAS_WEB_DIR",
$ilIliasIniFile->readVariable(
"clients",
"path"));
114 define(
"ILIAS_ABSOLUTE_PATH",
$ilIliasIniFile->readVariable(
'server',
'absolute_path'));
119 define (
"ILIAS_LOG_ENABLED",
$ilIliasIniFile->readVariable(
"log",
"enabled"));
120 define (
"ILIAS_LOG_LEVEL",
$ilIliasIniFile->readVariable(
"log",
"level"));
121 define (
"SLOW_REQUEST_TIME",
$ilIliasIniFile->readVariable(
"log",
"slow_request_time"));
124 define (
"PATH_TO_CONVERT",
$ilIliasIniFile->readVariable(
"tools",
"convert"));
125 define (
"PATH_TO_FFMPEG",
$ilIliasIniFile->readVariable(
"tools",
"ffmpeg"));
127 define (
"PATH_TO_MKISOFS",
$ilIliasIniFile->readVariable(
"tools",
"mkisofs"));
128 define (
"PATH_TO_UNZIP",
$ilIliasIniFile->readVariable(
"tools",
"unzip"));
129 define (
"PATH_TO_GHOSTSCRIPT",
$ilIliasIniFile->readVariable(
"tools",
"ghostscript"));
131 define (
"URL_TO_LATEX",
$ilIliasIniFile->readVariable(
"tools",
"latex"));
133 define (
"PATH_TO_LESSC",
$ilIliasIniFile->readVariable(
"tools",
"lessc"));
139 define(
"IL_VIRUS_SCANNER",
"Sophos");
140 define(
"IL_VIRUS_SCAN_COMMAND",
$ilIliasIniFile->readVariable(
"tools",
"scancommand"));
141 define(
"IL_VIRUS_CLEAN_COMMAND",
$ilIliasIniFile->readVariable(
"tools",
"cleancommand"));
145 define(
"IL_VIRUS_SCANNER",
"AntiVir");
146 define(
"IL_VIRUS_SCAN_COMMAND",
$ilIliasIniFile->readVariable(
"tools",
"scancommand"));
147 define(
"IL_VIRUS_CLEAN_COMMAND",
$ilIliasIniFile->readVariable(
"tools",
"cleancommand"));
151 define(
"IL_VIRUS_SCANNER",
"ClamAV");
152 define(
"IL_VIRUS_SCAN_COMMAND",
$ilIliasIniFile->readVariable(
"tools",
"scancommand"));
153 define(
"IL_VIRUS_CLEAN_COMMAND",
$ilIliasIniFile->readVariable(
"tools",
"cleancommand"));
157 define(
"IL_VIRUS_SCANNER",
"None");
161 include_once
'./Services/Calendar/classes/class.ilTimeZone.php';
163 define (
"IL_TIMEZONE",
$tz);
171 include_once
'./Services/Http/classes/class.ilHTTPS.php';
176 $protocol =
'https://';
180 $protocol =
'http://';
184 $rq_uri = strip_tags(
$_SERVER[
'REQUEST_URI']);
188 if (is_int($pos = strpos($rq_uri,
"?")))
190 $rq_uri = substr($rq_uri, 0, $pos);
195 $path = pathinfo($rq_uri);
196 if(!
$path[
'extension'])
202 $uri = dirname($rq_uri);
208 $path = dirname($rq_uri);
214 $dirs = explode(
'/',$module);
216 foreach($dirs as $dir)
218 $uri = dirname($uri);
238 if (!is_object($ilIliasIniFile))
240 self::abortAndDie(
"Fatal Error: ilInitialisation::determineClient called without initialisation of ILIAS ini file object.");
244 if (
$_GET[
"client_id"] !=
"")
247 if (!
defined(
"IL_PHPUNIT_TEST"))
258 $client_id = $ilIliasIniFile->readVariable(
"clients",
"default");
264 define (
"CLIENT_ID",
$_COOKIE[
"ilClientId"]);
268 define (
"CLIENT_ID",
$_GET[
"client_id"]);
289 if (ILIAS_WEB_DIR ==
"")
291 self::abortAndDie(
"Fatal Error: ilInitialisation::initClientIniFile called without ILIAS_WEB_DIR.");
297 self::abortAndDie(
"Fatal Error: ilInitialisation::initClientIniFile called without CLIENT_ID.");
300 $ini_file =
"./".ILIAS_WEB_DIR.
"/".CLIENT_ID.
"/client.ini.php";
303 require_once(
"./Services/Init/classes/class.ilIniFile.php");
304 $ilClientIniFile =
new ilIniFile($ini_file);
305 $ilClientIniFile->read();
308 if ($ilClientIniFile->ERROR !=
"")
311 $default_client = $ilIliasIniFile->readVariable(
"clients",
"default");
313 if (CLIENT_ID !=
"" && CLIENT_ID != $default_client)
315 $mess =
array(
"en" =>
"Client does not exist.",
316 "de" =>
"Mandant ist ungültig.");
317 self::redirect(
"index.php?client_id=".$default_client, null, $mess);
321 self::abortAndDie(
"Fatal Error: ilInitialisation::initClientIniFile initializing client ini file abborted with: ". $ilClientIniFile->ERROR);
325 self::initGlobal(
"ilClientIniFile", $ilClientIniFile);
328 define (
"SESSION_REMINDER_LEADTIME", 30);
329 define (
"DEBUG",$ilClientIniFile->readVariable(
"system",
"DEBUG"));
330 define (
"DEVMODE",$ilClientIniFile->readVariable(
"system",
"DEVMODE"));
331 define (
"SHOWNOTICES",$ilClientIniFile->readVariable(
"system",
"SHOWNOTICES"));
332 define (
"DEBUGTOOLS",$ilClientIniFile->readVariable(
"system",
"DEBUGTOOLS"));
333 define (
"ROOT_FOLDER_ID",$ilClientIniFile->readVariable(
'system',
'ROOT_FOLDER_ID'));
334 define (
"SYSTEM_FOLDER_ID",$ilClientIniFile->readVariable(
'system',
'SYSTEM_FOLDER_ID'));
335 define (
"ROLE_FOLDER_ID",$ilClientIniFile->readVariable(
'system',
'ROLE_FOLDER_ID'));
336 define (
"MAIL_SETTINGS_ID",$ilClientIniFile->readVariable(
'system',
'MAIL_SETTINGS_ID'));
337 $error_handler = $ilClientIniFile->readVariable(
'system',
'ERROR_HANDLER');
338 define (
"ERROR_HANDLER",$error_handler ? $error_handler :
"PRETTY_PAGE");
342 define (
"OH_REF_ID",$ilClientIniFile->readVariable(
"system",
"OH_REF_ID"));
344 define (
"SYSTEM_MAIL_ADDRESS",$ilClientIniFile->readVariable(
'system',
'MAIL_SENT_ADDRESS'));
345 define (
"MAIL_REPLY_WARNING",$ilClientIniFile->readVariable(
'system',
'MAIL_REPLY_WARNING'));
351 define (
"CLIENT_DATA_DIR",ILIAS_DATA_DIR.
"/".CLIENT_ID);
352 define (
"CLIENT_WEB_DIR",ILIAS_ABSOLUTE_PATH.
"/".ILIAS_WEB_DIR.
"/".CLIENT_ID);
353 define (
"CLIENT_NAME",$ilClientIniFile->readVariable(
'client',
'name'));
355 $val = $ilClientIniFile->readVariable(
"db",
"type");
358 define (
"IL_DB_TYPE",
"mysql");
362 define (
"IL_DB_TYPE", $val);
365 require_once(
'./Services/GlobalCache/classes/Settings/class.ilGlobalCacheSettings.php');
367 $ilGlobalCacheSettings->readFromIniFile($ilClientIniFile);
378 global $ilClientIniFile;
380 if (!$ilClientIniFile->readVariable(
"client",
"access"))
382 $mess =
array(
"en" =>
"The server is not available due to maintenance.".
383 " We apologise for any inconvenience.",
384 "de" =>
"Der Server ist aufgrund von Wartungsarbeiten nicht verfügbar.".
385 " Wir bitten um Verständnis.");
386 $mess_id =
"init_error_maintenance";
390 self::redirect(
"./maintenance.html", $mess_id, $mess);
394 $mess = self::translateMessage($mess_id, $mess);
395 self::abortAndDie($mess);
407 require_once(
"./Services/Database/classes/class.ilDBWrapperFactory.php");
408 $ilDB = ilDBWrapperFactory::getWrapper(IL_DB_TYPE);
409 $ilDB->initFromIniFile();
412 self::initGlobal(
"ilDB",
$ilDB);
422 if(ini_get(
'session.save_handler') !=
'user')
424 ini_set(
"session.save_handler",
"user");
427 require_once
"Services/Authentication/classes/class.ilSessionDBHandler.php";
429 if (!$db_session_handler->setSaveHandler())
431 self::abortAndDie(
"Please turn off Safe mode OR set session.save_handler to \"user\" in your php.ini");
438 if(function_exists(
"session_status") && session_status() == PHP_SESSION_ACTIVE)
440 session_regenerate_id();
450 include_once
'Services/Authentication/classes/class.ilAuthFactory.php';
474 define(
'IL_COOKIE_HTTPONLY',
true);
475 define(
'IL_COOKIE_EXPIRE', 0);
477 define(
'IL_COOKIE_DOMAIN',
'');
488 include_once
'./Services/Http/classes/class.ilHTTPS.php';
490 define(
'IL_COOKIE_SECURE', $cookie_secure);
492 session_set_cookie_params(
493 IL_COOKIE_EXPIRE,
IL_COOKIE_PATH, IL_COOKIE_DOMAIN, IL_COOKIE_SECURE, IL_COOKIE_HTTPONLY
506 self::initGlobal(
"ilSetting",
"ilSetting",
507 "Services/Administration/classes/class.ilSetting.php");
510 if (!$ilSetting->get(
"setup_ok"))
512 self::abortAndDie(
"Setup is not completed. Please run setup routine again.");
516 define (
"ANONYMOUS_USER_ID", $ilSetting->get(
"anonymous_user_id"));
517 define (
"ANONYMOUS_ROLE_ID", $ilSetting->get(
"anonymous_role_id"));
518 define (
"SYSTEM_USER_ID", $ilSetting->get(
"system_user_id"));
519 define (
"SYSTEM_ROLE_ID", $ilSetting->get(
"system_role_id"));
520 define (
"USER_FOLDER_ID", 7);
523 define (
"RECOVERY_FOLDER_ID", $ilSetting->get(
"recovery_folder_id"));
526 define (
"IL_INST_ID", $ilSetting->get(
"inst_id",0));
529 define (
"SUFFIX_REPL_DEFAULT",
"php,php3,php4,inc,lang,phtml,htaccess");
530 define (
"SUFFIX_REPL_ADDITIONAL", $ilSetting->get(
"suffix_repl_additional"));
534 self::buildHTTPPath();
543 global $styleDefinition, $ilPluginAdmin;
546 self::initGlobal(
"styleDefinition",
"ilStyleDefinition",
547 "./Services/Style/System/classes/class.ilStyleDefinition.php");
550 $pl_names = $ilPluginAdmin->getActivePluginsForSlot(
IL_COMP_SERVICE,
"UIComponent",
"uihk");
551 foreach ($pl_names as $pl)
554 $gui_class = $ui_plugin->getUIClassInstance();
555 $gui_class->modifyGUI(
"Services/Init",
"init_style",
array(
"styleDefinition" => $styleDefinition));
562 public static function initUserAccount()
569 $uid =
$GLOBALS[
'DIC'][
'ilAuthSession']->getUserId();
572 $ilUser->setId($uid);
576 include_once
'./Services/Logging/classes/public/class.ilLoggerFactory.php';
585 self::abortAndDie(
"Init user account failed");
596 if (trim($ilSetting->get(
"locale") !=
""))
598 $larr = explode(
",", trim($ilSetting->get(
"locale")));
601 foreach ($larr as
$l)
610 setlocale(LC_ALL, $ls);
613 setlocale(LC_NUMERIC,
"C");
615 if (class_exists(
"Collator"))
617 $GLOBALS[
"ilCollator"] =
new Collator($first);
618 $GLOBALS[
"DIC"][
"ilCollator"] =
function($c) {
635 if (ANONYMOUS_USER_ID ==
"")
637 self::abortAndDie(
"Public Section enabled, but no Anonymous user found.");
640 $session_destroyed =
false;
641 if(
$GLOBALS[
'DIC'][
'ilAuthSession']->isExpired())
643 $session_destroyed =
true;
646 if(!
$GLOBALS[
'DIC'][
'ilAuthSession']->isAuthenticated())
648 $session_destroyed =
true;
652 if($session_destroyed)
654 $GLOBALS[
'DIC'][
'ilAuthSession']->setAuthenticated(
true, ANONYMOUS_USER_ID);
657 self::initUserAccount();
660 if(strlen(
$_GET[
"target"]))
663 $current_script = substr(strrchr(
$_SERVER[
"PHP_SELF"],
"/"), 1);
664 if($current_script ==
"goto.php")
669 self::redirect(
"goto.php?target=".
$_GET[
"target"]);
673 #if(!$GLOBALS['DIC']->rbac()->system()->checkAccess('read', ROOT_FOLDER_ID)) 675 # return self::goToLogin(); 679 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
680 $_GET[
"cmd"] =
"frameset";
682 "ilias.php?baseClass=ilrepositorygui&reloadpublic=1&cmd=".
695 if(
$GLOBALS[
'DIC'][
'ilAuthSession']->isExpired())
699 if(!
$GLOBALS[
'DIC'][
'ilAuthSession']->isAuthenticated())
704 $script =
"login.php?target=".$_GET[
"target"].
"&client_id=".
$_COOKIE[
"ilClientId"].
705 "&auth_stat=".$a_auth_stat;
709 "init_error_authentication_fail",
711 "en" =>
"Authentication failed.",
712 "de" =>
"Authentifizierung fehlgeschlagen.")
719 protected static function initLanguage()
726 require_once
'Services/Language/classes/class.ilLanguage.php';
727 self::initGlobal(
'lng', ilLanguage::getGlobalInstance());
728 if(is_object($rbacsystem))
730 $rbacsystem->initMemberView();
739 self::initGlobal(
"rbacreview",
"ilRbacReview",
740 "./Services/AccessControl/classes/class.ilRbacReview.php");
742 require_once
"./Services/AccessControl/classes/class.ilRbacSystem.php";
744 self::initGlobal(
"rbacsystem", $rbacsystem);
746 self::initGlobal(
"rbacadmin",
"ilRbacAdmin",
747 "./Services/AccessControl/classes/class.ilRbacAdmin.php");
749 self::initGlobal(
"ilAccess",
"ilAccessHandler",
750 "./Services/AccessControl/classes/class.ilAccessHandler.php");
752 require_once
"./Services/AccessControl/classes/class.ilConditionHandler.php";
760 include_once
'./Services/Logging/classes/public/class.ilLoggerFactory.php';
763 self::initGlobal(
"ilLog",
$log);
765 self::initGlobal(
"log",
$log);
775 protected static function initGlobal($a_name, $a_class, $a_source_file = null)
781 include_once $a_source_file;
789 $DIC[$a_name] =
function ($c) use ($a_name) {
803 $GLOBALS[
'ilLog']->write(
"Fatal Error: ilInitialisation - ".$a_message);
813 if(
defined(SHOWNOTICES) && SHOWNOTICES)
819 error_reporting(E_ALL);
822 if(
defined(
'DEBUGTOOLS') && DEBUGTOOLS)
824 include_once
"include/inc.debug.php";
832 self::$already_initialized =
false;
841 if (self::$already_initialized)
857 $tpl->setVariable(
"LOCATION_STYLESHEET", $location_stylesheet);
864 $GLOBALS[
"DIC"] = new \ILIAS\DI\Container();
865 $GLOBALS[
"DIC"][
"ilLoggerFactory"] =
function($c) {
869 self::$already_initialized =
true;
884 self::resumeUserSession();
889 self::includePhp5Compliance();
892 self::initLanguage();
893 $GLOBALS[
'DIC'][
'tree']->initLangCode();
897 include_once(
'./Services/WebServices/ECS/classes/class.ilECSTaskScheduler.php');
910 include_once
'./Services/Authentication/classes/class.ilAuthSession.php';
913 $GLOBALS[
'DIC'][
'ilAuthSession']->init();
923 error_reporting(E_ALL & ~E_NOTICE);
936 self::handleErrorReporting();
941 self::requireCommonIncludes();
945 self::initGlobal(
"ilErr",
"ilErrorHandling",
946 "./Services/Init/classes/class.ilErrorHandling.php");
953 include_once
"Services/Authentication/classes/class.ilSession.php";
959 self::removeUnsafeCharacters();
961 self::initIliasIniFile();
963 define(
'IL_INITIAL_WD', getcwd());
966 self::initGlobal(
"ilias",
"ILIAS",
"./Services/Init/classes/class.ilias.php");
976 self::setCookieConstants();
978 self::determineClient();
980 self::initClientIniFile();
985 $ilias->client_id = CLIENT_ID;
989 self::handleDevMode();
993 self::handleMaintenanceMode();
995 self::initDatabase();
1000 self::initGlobal(
"ilAppEventHandler",
"ilAppEventHandler",
1001 "./Services/EventHandling/classes/class.ilAppEventHandler.php");
1008 if (!is_object(
$GLOBALS[
"ilPluginAdmin"]))
1010 self::initGlobal(
"ilPluginAdmin",
"ilPluginAdmin",
1011 "./Services/Component/classes/class.ilPluginAdmin.php");
1014 self::setSessionHandler();
1016 self::initSettings();
1026 self::initGlobal(
"https",
"ilHTTPS",
"./Services/Http/classes/class.ilHTTPS.php");
1027 $https->enableSecureCookies();
1028 $https->checkPort();
1034 self::initGlobal(
"ilObjDataCache",
"ilObjectDataCache",
1035 "./Services/Object/classes/class.ilObjectDataCache.php");
1038 require_once
"./Services/Xml/classes/class.ilSaxParser.php";
1040 self::initGlobal(
"objDefinition",
"ilObjectDefinition",
1041 "./Services/Object/classes/class.ilObjectDefinition.php");
1044 require_once
"./Services/Tree/classes/class.ilTree.php";
1045 $tree =
new ilTree(ROOT_FOLDER_ID);
1046 self::initGlobal(
"tree", $tree);
1049 self::initGlobal(
"ilCtrl",
"ilCtrl",
1050 "./Services/UICore/classes/class.ilCtrl.php");
1052 self::setSessionCookieParams();
1066 "./Services/User/classes/class.ilObjUser.php" 1070 self::initAccessHandling();
1078 include_once
'./Services/Authentication/classes/class.ilAuthUtils.php';
1084 !
$GLOBALS[
'DIC'][
'ilAuthSession']->isAuthenticated()
or 1085 $GLOBALS[
'DIC'][
'ilAuthSession']->isExpired()
1089 $current_script = substr(strrchr(
$_SERVER[
"PHP_SELF"],
"/"), 1);
1090 if(self::blockedAuthentication($current_script))
1096 return self::handleAuthenticationFail();
1099 return self::initUserAccount();
1110 global $ilAuth, $ilias,
$ilErr;
1112 $current_script = substr(strrchr(
$_SERVER[
"PHP_SELF"],
"/"), 1);
1114 if(self::blockedAuthentication($current_script))
1119 $oldSid = session_id();
1122 $ilias->setAuthError($ilErr->getLastError());
1124 if($ilAuth->getAuth() && $ilAuth->getStatus() ==
'')
1126 self::initUserAccount();
1128 self::handleAuthenticationSuccess();
1132 if (!self::showingLoginForm($current_script))
1135 $mandatory_auth = ($current_script !=
"shib_login.php" 1136 && $current_script !=
"shib_logout.php" 1137 && $current_script !=
"error.php" 1138 && $current_script !=
"chat.php" 1139 && $current_script !=
"wac.php" 1140 && $current_script !=
"index.php");
1144 self::handleAuthenticationFail();
1153 protected static function handleAuthenticationSuccess()
1160 require_once
'Services/Tracking/classes/class.ilOnlineTracking.php';
1161 ilOnlineTracking::updateAccess($ilUser);
1167 protected static function handleAuthenticationFail()
1182 throw new Exception(
"Authentication failed.");
1184 if(
$GLOBALS[
'DIC'][
'ilAuthSession']->isExpired())
1187 return self::goToLogin();
1189 if($ilSetting->get(
'pub_section'))
1192 return self::goToPublicSection();
1195 return self::goToLogin();
1202 $c[
"ui.factory"] =
function ($c) {
1205 $c[
"ui.renderer"] =
function($c) {
1208 , $c[
"ui.template_factory"]
1209 , $c[
"ui.resource_registry"]
1211 , $c[
"ui.javascript_binding"]
1214 $c[
"ui.template_factory"] =
function($c) {
1219 $c[
"ui.resource_registry"] =
function($c) {
1222 $c[
"ui.javascript_binding"] =
function($c) {
1241 self::initUIFramework(
$GLOBALS[
"DIC"]);
1245 self::initGlobal(
"tpl",
$tpl);
1248 require_once
'Services/User/classes/class.ilUserRequestTargetAdjustment.php';
1250 $request_adjuster->adjust();
1256 $tpl->setVariable(
"LOCATION_STYLESHEET",$location_stylesheet);
1258 require_once
"./Services/UICore/classes/class.ilFrameTargetInfo.php";
1260 self::initGlobal(
"ilNavigationHistory",
"ilNavigationHistory",
1261 "Services/Navigation/classes/class.ilNavigationHistory.php");
1263 self::initGlobal(
"ilBrowser",
"ilBrowser",
1264 "./Services/Utilities/classes/class.ilBrowser.php");
1266 self::initGlobal(
"ilHelp",
"ilHelpGUI",
1267 "Services/Help/classes/class.ilHelpGUI.php");
1269 self::initGlobal(
"ilToolbar",
"ilToolbarGUI",
1270 "./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php");
1272 self::initGlobal(
"ilLocator",
"ilLocatorGUI",
1273 "./Services/Locator/classes/class.ilLocatorGUI.php");
1275 self::initGlobal(
"ilTabs",
"ilTabsGUI",
1276 "./Services/UIComponent/Tabs/classes/class.ilTabsGUI.php");
1281 include_once
'./Services/MainMenu/classes/class.ilMainMenuGUI.php';
1283 self::initGlobal(
"ilMainMenu", $ilMainMenu);
1290 $_GET[
'limit'] = (int) $ilUser->getPref(
'hits_per_page');
1299 if (isset(
$_GET[
'offset']) &&
$_GET[
'offset'] !=
"")
1307 include_once
"Services/User/classes/class.ilObjUser.php";
1318 $cmd = $_REQUEST[
"cmd"];
1321 return array_shift(array_keys(
$cmd));
1358 $a_current_script ==
"register.php" ||
1359 $a_current_script ==
"pwassist.php" ||
1360 $a_current_script ==
"confirmReg.php" ||
1361 $a_current_script ==
"il_securimage_play.php" ||
1362 $a_current_script ==
"il_securimage_show.php" ||
1363 $a_current_script ==
'login.php' 1370 if($_REQUEST[
"baseClass"] ==
"ilStartUpGUI")
1372 $cmd_class = $_REQUEST[
"cmdClass"];
1374 if($cmd_class ==
"ilaccountregistrationgui" ||
1375 $cmd_class ==
"ilpasswordassistancegui")
1381 $cmd = self::getCurrentCmd();
1383 $cmd ==
"showTermsOfService" ||
$cmd ==
"showClientList" ||
1384 $cmd ==
'showAccountMigration' ||
$cmd ==
'migrateAccount' ||
1385 $cmd ==
'processCode' ||
$cmd ==
'showLoginPage' ||
$cmd ==
'doStandardAuthentication' ||
$cmd ==
'doCasAuthentication' 1394 if(($a_current_script ==
"goto.php" &&
$_GET[
"target"] ==
"impr_0") ||
1395 $_GET[
"baseClass"] ==
"ilImprintGUI")
1411 if($a_current_script ==
"login.php")
1416 if($_REQUEST[
"baseClass"] ==
"ilStartUpGUI" &&
1417 self::getCurrentCmd() ==
"showLoginPage")
1442 $lang = $ilUser->getLanguage();
1444 else if($_REQUEST[
"lang"])
1450 $lang = $ilSetting->get(
"language");
1452 else if($ilClientIniFile)
1454 $lang = $ilClientIniFile->readVariable(
"language",
"default");
1459 $lang = $lng->getLangKey();
1463 if($ilDB && $a_message_id)
1467 require_once
"./Services/Language/classes/class.ilLanguage.php";
1471 $lng->loadLanguageModule(
"init");
1472 $message = $lng->txt($a_message_id);
1474 else if(is_array($a_message_static))
1476 if(!isset($a_message_static[
$lang]))
1480 $message = $a_message_static[
$lang];
1483 return utf8_decode($message);
1493 protected static function redirect($a_target, $a_message_id =
'',
array $a_message_static = null)
1496 if(
defined(
"ILIAS_HTTP_PATH") &&
1497 !stristr($a_target, ILIAS_HTTP_PATH))
1499 $a_target = ILIAS_HTTP_PATH.
"/".$a_target;
1508 $message = self::translateMessage($a_message_id, $a_message_static);
1513 $link = self::translateMessage(
"init_error_redirect_click",
1514 array(
"en" =>
'Please click to continue.',
1515 "de" =>
'Bitte klicken um fortzufahren.'));
1517 '<br /><a href="'.$a_target.
'">'.$link.
'</a>';
1527 $mess = self::translateMessage(
"init_error_redirect_info",
1528 array(
"en" =>
'Redirect not supported by context.',
1529 "de" =>
'Weiterleitungen werden durch Kontext nicht unterstützt.')).
1534 self::abortAndDie($mess);
1541 public static function redirectToStartingPage()
1549 if ($ilUser->getId() == ANONYMOUS_USER_ID)
1557 if(!
$_GET[
"target"])
1560 include_once
'./Services/User/classes/class.ilUserUtil.php';
static handleMaintenanceMode()
handle maintenance mode
Handles display of the main menu.
static hasUser()
Based on user authentication?
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']
const PEAR_ERROR_CALLBACK
static includePhp5Compliance()
This is a hack for authentication.
static usesHTTP()
Uses HTTP aka browser.
static initHTML()
init HTML output (level 3)
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static blockedAuthentication($a_current_script)
Block authentication based on current request.
Class ilGlobalCacheSettings.
Database Session Handling.
static setup(ilGlobalCacheSettings $ilGlobalCacheSettings)
Wraps global ilTemplate to provide JavaScriptBinding.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
const SESSION_CLOSE_LOGIN
static determineClient()
This method determines the current client and sets the constant CLIENT_ID.
static get($a_var)
Get a value.
static set($a_var, $a_val)
Set a value.
static initDefaultTimeZone(ilIniFile $ini)
Initialize default timezone from system settings.
static goToPublicSection()
go to public section
Add rich text string
The name of the decorator.
static resumeUserSession()
Resume an existing user session.
static setCookieConstants()
static getStartingPointAsUrl()
Get current starting point setting as URL.
static setSessionHandler()
set session handler to db
static initSession()
Init session.
static getCurrentCmd()
Extract current cmd from request.
static initAccessHandling()
$ilAccess and $rbac...
const SESSION_CLOSE_EXPIRE
static initILIAS()
ilias initialisation
static handleForcedAuthentication()
static usesTemplate()
Uses template engine.
static setCookie($a_cookie_name, $a_cookie_value='', $a_also_set_super_global=true, $a_set_cookie_invalid=false)
static $already_initialized
static start()
Start task scheduler for each server instance.
static initDatabase()
initialise database object $ilDB
static initUIFramework(\ILIAS\DI\Container $c)
init the ILIAS UI framework.
Factory for wrapped ilTemplates.
const IL_COOKIE_PATH(isset($_GET["client_id"]))
static _exists($a_session_id)
Check whether session exists.
static initClientIniFile()
This method provides a global instance of class ilIniFile for the client.ini.php file in variable $il...
static hasHTML()
Has HTML output.
static abortAndDie($a_message)
Exit.
special template class to simplify handling of ITX/PEAR
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
static initLocale()
Init Locale.
static requireCommonIncludes()
get common include code files
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static initLog()
Init log instance.
static removeTrailingPathSeparators($path)
Class ilUserAccountMaintenanceEnforcement.
static initStyle()
provide $styleDefinition object
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
Create styles array
The data for the language used.
static initClient()
Init client-based objects (level 1)
static initIliasIniFile()
This method provides a global instance of class ilIniFile for the ilias.ini.php file in variable $ilI...
static getInstance()
Get https instance.
const SESSION_CLOSE_PUBLIC
static redirect($a_target, $a_message_id='', array $a_message_static=null)
Redirects to target url if context supports it.
static removeUnsafeCharacters()
Remove unsafe characters from GET.
static initCore()
Init core objects (level 0)
static authenticate()
Try authentication.
static setSessionCookieParams()
set session cookie params
static supportsPersistentSessions()
Check if context supports persistent session handling.
static setClosingContext($a_context)
set closing context (for statistics)
ILIAS Initialisation Utility Class perform basic setup: init database handler, load configuration fil...
static initClient()
Init client.
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
static initGlobal($a_name, $a_class, $a_source_file=null)
Initialize global instance.
static goToLogin()
go to login
static getLogger($a_component_id)
Get component logger.
static getType()
Get context type.
static translateMessage($a_message_id, array $a_message_static=null)
Translate message if possible.
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
static recursivelyRemoveUnsafeCharacters($var)
static redirect($a_script)
http redirect to other script
static handleErrorReporting()
Set error reporting level.
static showingLoginForm($a_current_script)
Is current view the login form?
static initSettings()
initialise $ilSettings object and define constants
static getInstance()
Get instance.
static initUser()
Init user / authentification (level 2)
static buildHTTPPath()
builds http path
static getRootLogger()
The unique root logger has a fixed error level.
Plumbing for ILIAS, tries to guess.
static supportsRedirects()
Are redirects supported?
static handleDevMode()
Prepare developer tools.