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