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.08 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();
$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');
$tpl->SetCurrentBlock("ErrorLink");
$tpl->SetVariable("TXT_LINK", $txt);
$tpl->SetVariable("LINK", ilUtil::secureUrl(ILIAS_HTTP_PATH . '/ilias.php?baseClass=ilRepositoryGUI&client_id=' . CLIENT_ID));
$tpl->ParseCurrentBlock();
$tpl->setCurrentBlock("content");
$tpl->setVariable("ERROR_MESSAGE", ($_SESSION["failure"]));
$tpl->setVariable("MESSAGE_HEADING", $lng->txt('error_sry_error'));
//$tpl->parseCurrentBlock();
ilSession::clear("referer");
ilSession::clear("message");
$tpl->show();
}
catch(Exception $e)
{
if(defined('DEVMODE') && DEVMODE)
{
throw $e;
}
if (!($e instanceof \PDOException)) {
die($e->getMessage());
}
}