Fixed error in url() function

Sometimes url() function produced URL with unnecessary slash, eg.
`http://dalerium.net//register.php` - that's fixed.
This commit is contained in:
Daniel 2014-03-30 23:16:11 +02:00
parent 5e0170a264
commit c83cbb14ab

View File

@ -94,7 +94,7 @@ function url($path = false) {
$domain = $_SERVER['SERVER_NAME'] . ($_SERVER['SERVER_PORT'] != 80 ? ':' . $_SERVER['SERVER_PORT'] : null);
$folder = dirname($_SERVER['SCRIPT_NAME']);
return $protocol . $domain . $folder . '/' . $path;
return $protocol . $domain . ($folder == '/' ? '' : $folder) . '/' . $path;
}
function getCache() {