Issue #212 Setting Defaults for Pushover
- bug fix - duplicate slash in the URL if the URL domain second or third order and the application is not in another folderpull/304/head
parent
bc45f53ba2
commit
34e6f9a157
|
@ -508,7 +508,10 @@ function psm_build_url($params = array(), $urlencode = true, $htmlentities = tru
|
|||
$url = ($_SERVER['SERVER_PORT'] == 443 ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'];
|
||||
// on Windows, dirname() adds both back- and forward slashes (http://php.net/dirname).
|
||||
// for urls, we only want the forward slashes.
|
||||
$url .= dirname($_SERVER['SCRIPT_NAME']) . '/';
|
||||
$url .= dirname($_SERVER['SCRIPT_NAME']);
|
||||
if (dirname($_SERVER['SCRIPT_NAME']) != '/') {
|
||||
$url .= '/';
|
||||
}
|
||||
$url = str_replace('\\', '', $url);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue