From 20ca4e9e509a111f8de0069feeac54e3b31098ee Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Fri, 19 Apr 2013 13:28:19 +0100 Subject: Allow usage in a subdir of a host. --- src/phorkie/Tools.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/phorkie/Tools.php') diff --git a/src/phorkie/Tools.php b/src/phorkie/Tools.php index 1d3d226..fc815cc 100644 --- a/src/phorkie/Tools.php +++ b/src/phorkie/Tools.php @@ -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; } /** -- cgit v1.2.3