Allow usage in a subdir of a host.
[phorkie.git] / src / phorkie / Tools.php
index 1d3d2260ebc8aaa27af0ac06aa753f68977f3d45..fc815cc5679085c139028f35fab58ea1531f819b 100644 (file)
@@ -38,14 +38,14 @@ class Tools
      *
      * @return string Full URL
      */
-    public static function fullUrl($path)
+    public static function fullUrl($path = '')
     {
         if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']) {
             $prot = 'https';
         } else {
             $prot = 'http';
         }
-        return $prot . '://' . $_SERVER['HTTP_HOST'] . $path;
+        return $prot . '://' . $_SERVER['HTTP_HOST'] . $GLOBALS['phorkie']['cfg']['baseurl'] . $path;
     }
 
     /**