X-Git-Url: https://git.cweiske.de/phorkie.git/blobdiff_plain/39e0a6893c7f5c31cdbc89633c37525fd62bac46..925eaabf42cbbbe2ceac8e1bb95c11ec8be5f375:/www/www-header.php diff --git a/www/www-header.php b/www/www-header.php index 0fd3c79..c0b18d3 100644 --- a/www/www-header.php +++ b/www/www-header.php @@ -21,6 +21,13 @@ set_exception_handler( } else { header('HTTP/1.0 500 Internal server error'); } + + if (!isset($GLOBALS['twig'])) { + echo '

Exception

'; + echo '

' . $e->getMessage() . '

'; + exit(); + } + render( 'exception', array( @@ -36,8 +43,9 @@ require_once __DIR__ . '/../data/config.default.php'; if (file_exists(__DIR__ . '/../data/config.php')) { require_once __DIR__ . '/../data/config.php'; } -require_once 'VersionControl/Git.php'; -require_once 'Twig/Autoloader.php'; +if ($GLOBALS['phorkie']['cfg']['setupcheck']) { + SetupCheck::run(); +} \Twig_Autoloader::register(); $loader = new \Twig_Loader_Filesystem($GLOBALS['phorkie']['cfg']['tpl']); @@ -48,6 +56,7 @@ $twig = new \Twig_Environment( 'debug' => true ) ); +//$twig->addExtension(new \Twig_Extension_Debug()); function render($tplname, $vars) {