1
0
Fork 0
mirror of https://gitlab.easter-eggs.com/ee/ldapsaisie.git synced 2024-12-26 10:23:47 +01:00

Fix LSurl :: get_rewrite_base() method (again)

This commit is contained in:
Benjamin Renard 2020-06-29 16:59:23 +02:00
parent d0beb86b3d
commit 47d97a00ce

View file

@ -316,9 +316,9 @@ class LSurl extends LSlog_staticLoggerClass {
$public_root_url = LSconfig :: get('public_root_url', '/', 'string'); $public_root_url = LSconfig :: get('public_root_url', '/', 'string');
$rewrite_base = '/'; $rewrite_base = '/';
if (preg_match('|^https?://[^/]+(/.*)$|', $public_root_url, $m)) if (preg_match('|^https?://[^/]+(/.*)$|', $public_root_url, $m))
return $rewrite_base = $m[1]; $rewrite_base = $m[1];
elseif (preg_match('|^(/.+)$|', $public_root_url, $m)) elseif (preg_match('|^(/.+)$|', $public_root_url, $m))
return $rewrite_base = $m[1]; $rewrite_base = $m[1];
if ($rewrite_base != '/') if ($rewrite_base != '/')
return self :: remove_trailing_slash($rewrite_base).'/'; return self :: remove_trailing_slash($rewrite_base).'/';
return $rewrite_base; return $rewrite_base;