ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
error.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21try {
22 require_once '../vendor/composer/vendor/autoload.php';
23 require_once __DIR__ . '/../artifacts/bootstrap_default.php';
24 entry_point('ILIAS Legacy Initialisation Adapter');
25 $DIC->globalScreen()->tool()->context()->claim()->external();
26 $local_tpl = new ilGlobalTemplate("tpl.main.html", true, true);
27 $local_tpl->addBlockFile("CONTENT", "content", "tpl.error.html");
28 $lng->loadLanguageModule("error");
29 // #13515 - link back to "system" [see ilWebAccessChecker::sendError()]
30 $nd = $tree->getNodeData(ROOT_FOLDER_ID);
31 $txt = $lng->txt('error_back_to_repository');
32 $local_tpl->SetCurrentBlock("ErrorLink");
33 $local_tpl->SetVariable("TXT_LINK", $txt);
34 $local_tpl->SetVariable("LINK", ilUtil::secureUrl(ILIAS_HTTP_PATH . '/ilias.php?baseClass=ilRepositoryGUI&amp;client_id=' . CLIENT_ID));
35 $local_tpl->ParseCurrentBlock();
36
37 ilSession::clear("referer");
38 ilSession::clear("message");
39 $tpl->setContent($local_tpl->get());
40 $tpl->printToStdout();
41} catch (Exception $e) {
42 if (defined('DEVMODE') && DEVMODE) {
43 throw $e;
44 }
45
46 if (!($e instanceof \PDOException)) {
47 die($e->getMessage());
48 }
49}
special template class to simplify handling of ITX/PEAR
static clear(string $a_var)
static secureUrl(string $url)
const CLIENT_ID
Definition: constants.php:41
const ROOT_FOLDER_ID
Definition: constants.php:32
$local_tpl
Definition: error.php:26
$nd
Definition: error.php:30
$txt
Definition: error.php:31
global $lng
Definition: privfeed.php:31
entry_point(string $name)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: result1.php:21
global $DIC
Definition: shib_login.php:26