Catch remote forking errors and display them
[phorkie.git] / www / www-header.php
index 41b5e4731889961080f511e2a5474473ea4bb49e..1d59b1c4feb7447628bd0e3f278946b62b090225 100644 (file)
@@ -84,7 +84,12 @@ if (!isset($noSecurityCheck) || $noSecurityCheck !== true) {
 
 function render($tplname, $vars = array())
 {
+    $vars['baseurl'] = '/';
+    if (!empty($GLOBALS['phorkie']['cfg']['baseurl'])) {
+        $vars['baseurl'] = $GLOBALS['phorkie']['cfg']['baseurl'];
+    }
     $vars['css'] = $GLOBALS['phorkie']['cfg']['css'];
+    $vars['iconpng'] = $GLOBALS['phorkie']['cfg']['iconpng'];
     $vars['title'] = $GLOBALS['phorkie']['cfg']['title'];
     $vars['topbar'] = $GLOBALS['phorkie']['cfg']['topbar'];
     if (isset($_SESSION['identity'])) {
@@ -93,6 +98,9 @@ function render($tplname, $vars = array())
         $vars['email'] = $_SESSION['email'];
     }
     $vars['db'] = new Database();
+    if (!isset($vars['htmlhelper'])) {
+        $vars['htmlhelper'] = new HtmlHelper();
+    }
 
     $template = $GLOBALS['twig']->loadTemplate($tplname . '.htm');
     echo $template->render($vars);