ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
error.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
5 try {
6  require_once("Services/Init/classes/class.ilInitialisation.php");
8  $DIC->globalScreen()->tool()->context()->claim()->external();
9  $local_tpl = new ilGlobalTemplate("tpl.main.html", true, true);
10  $local_tpl->addBlockFile("CONTENT", "content", "tpl.error.html");
11  $lng->loadLanguageModule("error");
12  // #13515 - link back to "system" [see ilWebAccessChecker::sendError()]
13  $nd = $tree->getNodeData(ROOT_FOLDER_ID);
14  $txt = $lng->txt('error_back_to_repository');
15  $local_tpl->SetCurrentBlock("ErrorLink");
16  $local_tpl->SetVariable("TXT_LINK", $txt);
17  $local_tpl->SetVariable("LINK", ilUtil::secureUrl(ILIAS_HTTP_PATH . '/ilias.php?baseClass=ilRepositoryGUI&amp;client_id=' . CLIENT_ID));
18  $local_tpl->ParseCurrentBlock();
19 
20  ilSession::clear("referer");
21  ilSession::clear("message");
22  $tpl->setContent($local_tpl->get());
23  $tpl->printToStdout();
24 } catch (Exception $e) {
25  if (defined('DEVMODE') && DEVMODE) {
26  throw $e;
27  }
28 
29  if (!($e instanceof \PDOException)) {
30  die($e->getMessage());
31  }
32 }
$local_tpl
Definition: error.php:9
special template class to simplify handling of ITX/PEAR
const ROOT_FOLDER_ID
Definition: constants.php:32
static secureUrl(string $url)
global $DIC
Definition: feed.php:28
static initILIAS()
ilias initialisation
$nd
Definition: error.php:13
$lng
const CLIENT_ID
Definition: constants.php:41
$txt
Definition: error.php:14
static clear(string $a_var)