mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-04-29 18:59:21 +02:00
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:
parent
5e0170a264
commit
c83cbb14ab
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user