X-Git-Url: https://git.cweiske.de/phorkie.git/blobdiff_plain/5f427dd38c8d47711ea73015076bb390761e05dd..03bca6d0304209d14c6bfaae0e1fb4b85057adfd:/www/www-header.php diff --git a/www/www-header.php b/www/www-header.php index 8b99234..756bdc9 100644 --- a/www/www-header.php +++ b/www/www-header.php @@ -1,5 +1,5 @@ $e)); + render( + 'exception', + array( + 'exception' => $e, + 'debug' => $GLOBALS['phorkie']['cfg']['debug'] + ) + ); exit(); } ); 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'; \Twig_Autoloader::register(); @@ -42,12 +51,15 @@ $twig = new \Twig_Environment( function render($tplname, $vars) { + $vars['css'] = $GLOBALS['phorkie']['cfg']['css']; + $vars['title'] = $GLOBALS['phorkie']['cfg']['title']; + $template = $GLOBALS['twig']->loadTemplate($tplname . '.htm'); echo $template->render($vars); } function redirect($target) { - header('Location: /' . $target); + header('Location: ' . $target); exit(); } ?> \ No newline at end of file