X-Git-Url: https://git.p6c8.net/jirafeau_mojo42.git/blobdiff_plain/c147db2590b6add287eac571b1ce751be734b2ea..bf0a496a102b28c08906879f18120b194793a922:/lib/settings.php diff --git a/lib/settings.php b/lib/settings.php index da0d9db..33c76da 100644 --- a/lib/settings.php +++ b/lib/settings.php @@ -42,6 +42,15 @@ define ('VAR_LINKS', $cfg['var_root'] . 'links/'); define ('VAR_ASYNC', $cfg['var_root'] . 'async/'); define ('VAR_ALIAS', $cfg['var_root'] . 'alias/'); +// helping variable to build absolute link to +// root of the domain without handling the URL scheme +$absPrefix = parse_url($cfg['web_root'], PHP_URL_PATH); +if(true === empty($absPrefix)) { + // fallback if installation isnt done yet: relative links to same level on the current page + $absPrefix = './'; +} +define ('JIRAFEAU_ABSPREFIX', $absPrefix); + /* Useful constants. */ if (!defined ('NL')) { define ('NL', "\n");