git.cweiske.de
/
phorkie.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use configured elasticsearch address
[phorkie.git]
/
www
/
www-header.php
diff --git
a/www/www-header.php
b/www/www-header.php
index 0a3b5628ce0d9c2e33c413b6b5e73a3a1c415fb0..f381872691f67a29140c67fb6a488600e36e587c 100644
(file)
--- 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');
}
} else {
header('HTTP/1.0 500 Internal server error');
}
+
+ if (!isset($GLOBALS['twig'])) {
+ echo '<h1>Exception</h1>';
+ echo '<p>' . $e->getMessage() . '</p>';
+ exit();
+ }
+
render(
'exception',
array(
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';
}
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']);
\Twig_Autoloader::register();
$loader = new \Twig_Loader_Filesystem($GLOBALS['phorkie']['cfg']['tpl']);
@@
-52,6
+60,9
@@
$twig = new \Twig_Environment(
function render($tplname, $vars)
{
$vars['css'] = $GLOBALS['phorkie']['cfg']['css'];
function render($tplname, $vars)
{
$vars['css'] = $GLOBALS['phorkie']['cfg']['css'];
+ $vars['title'] = $GLOBALS['phorkie']['cfg']['title'];
+ $vars['topbar'] = $GLOBALS['phorkie']['cfg']['topbar'];
+
$template = $GLOBALS['twig']->loadTemplate($tplname . '.htm');
echo $template->render($vars);
}
$template = $GLOBALS['twig']->loadTemplate($tplname . '.htm');
echo $template->render($vars);
}