forked from ILIAS-eLearning/ILIAS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
error.php
executable file
·38 lines (33 loc) · 1.39 KB
/
error.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
try {
require_once("Services/Init/classes/class.ilInitialisation.php");
ilInitialisation::initILIAS();
$DIC->globalScreen()->tool()->context()->claim()->external();
$local_tpl = new ilGlobalTemplate("tpl.main.html", true, true);
$local_tpl->addBlockFile("CONTENT", "content", "tpl.error.html");
$lng->loadLanguageModule("error");
// #13515 - link back to "system" [see ilWebAccessChecker::sendError()]
$nd = $tree->getNodeData(ROOT_FOLDER_ID);
$txt = $lng->txt('error_back_to_repository');
$local_tpl->SetCurrentBlock("ErrorLink");
$local_tpl->SetVariable("TXT_LINK", $txt);
$local_tpl->SetVariable("LINK", ilUtil::secureUrl(ILIAS_HTTP_PATH . '/ilias.php?baseClass=ilRepositoryGUI&client_id=' . CLIENT_ID));
$local_tpl->ParseCurrentBlock();
$local_tpl->setCurrentBlock("content");
$local_tpl->setVariable("ERROR_MESSAGE", ($_SESSION["failure"]));
$tpl->setTitle($lng->txt('error_sry_error'));
//$tpl->parseCurrentBlock();
ilSession::clear("referer");
ilSession::clear("message");
//$local_tpl->printToStdout();
$tpl->setContent($local_tpl->get());
$tpl->printToStdout();
} catch (Exception $e) {
if (defined('DEVMODE') && DEVMODE) {
throw $e;
}
if (!($e instanceof \PDOException)) {
die($e->getMessage());
}
}