Allow usage in a subdir of a host.
[phorkie.git] / www / www-header.php
index 41b5e4731889961080f511e2a5474473ea4bb49e..cda7047b9b94d01cb4018e0006b9158e5101878b 100644 (file)
@@ -84,6 +84,10 @@ 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['title'] = $GLOBALS['phorkie']['cfg']['title'];
     $vars['topbar'] = $GLOBALS['phorkie']['cfg']['topbar'];