send cache headers for static phorkie .png files
[phorkie.git] / www / www-header.php
index 5381eed67a4f01e89b528ad7a47a8630d6031d9d..74329ed6d0da1191fa61969fd29cd36ed974bc44 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 namespace phorkie;
-error_reporting(error_reporting() & ~E_STRICT);
+error_reporting(error_reporting() & ~E_STRICT & ~E_DEPRECATED);
 session_set_cookie_params(14 * 86400);//2 weeks session expiry time
 session_start();
 
@@ -50,6 +50,12 @@ if (file_exists($cfgFilePath)) {
 
 if ($GLOBALS['phorkie']['cfg']['baseurl'] === null) {
     $GLOBALS['phorkie']['cfg']['baseurl'] = Tools::detectBaseUrl();
+    if (substr($GLOBALS['phorkie']['cfg']['git']['public'], 0, 9) == '%BASEURL%') {
+        //make autoconfig work
+        $GLOBALS['phorkie']['cfg']['git']['public'] = Tools::fullUrlNoPhar(
+            substr($GLOBALS['phorkie']['cfg']['git']['public'], 9)
+        );
+    }
 }
 
 // Set/Get git commit session variables