git.cweiske.de
/
phorkie.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make title configurable
[phorkie.git]
/
www
/
www-header.php
diff --git
a/www/www-header.php
b/www/www-header.php
index 8b99234a0b091216d5129158a93c8030fcffebb4..756bdc97f936cabb95b0bfffae5c92c77c2fbd50 100644
(file)
--- a/
www/www-header.php
+++ b/
www/www-header.php
@@
-1,5
+1,5
@@
<?php
<?php
-namespace
P
horkie;
+namespace
p
horkie;
set_include_path(
__DIR__ . '/../src/'
. PATH_SEPARATOR . get_include_path()
set_include_path(
__DIR__ . '/../src/'
. PATH_SEPARATOR . get_include_path()
@@
-21,12
+21,21
@@
set_exception_handler(
} else {
header('HTTP/1.0 500 Internal server error');
}
} else {
header('HTTP/1.0 500 Internal server error');
}
- render('exception', array('exception' => $e));
+ render(
+ 'exception',
+ array(
+ 'exception' => $e,
+ 'debug' => $GLOBALS['phorkie']['cfg']['debug']
+ )
+ );
exit();
}
);
require_once __DIR__ . '/../data/config.default.php';
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();
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)
{
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)
{
$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
exit();
}
?>
\ No newline at end of file