mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-04-30 03:09:22 +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);
|
$domain = $_SERVER['SERVER_NAME'] . ($_SERVER['SERVER_PORT'] != 80 ? ':' . $_SERVER['SERVER_PORT'] : null);
|
||||||
$folder = dirname($_SERVER['SCRIPT_NAME']);
|
$folder = dirname($_SERVER['SCRIPT_NAME']);
|
||||||
|
|
||||||
return $protocol . $domain . $folder . '/' . $path;
|
return $protocol . $domain . ($folder == '/' ? '' : $folder) . '/' . $path;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCache() {
|
function getCache() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user