Add a helping variable to build absolute links to
the root of the domain without handling the URL scheme.
This way all links could get rid of the host & domain part,
and just build absolute links to the root instead.
(Replace "[https://example.com/foo/] + [functions.js]" with
"[/foo/] + [functions.js]")
Refs #79
define ('VAR_ASYNC', $cfg['var_root'] . 'async/');
define ('VAR_ALIAS', $cfg['var_root'] . 'alias/');
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");
/* Useful constants. */
if (!defined ('NL')) {
define ('NL', "\n");