Fix base URL when public root URL is set to "/"

This commit is contained in:
Benjamin Renard 2024-08-28 10:52:00 +02:00
parent efecc67af0
commit 24d76d6c9c
Signed by: bn8
GPG key ID: 3E2E1CE1907115BC

View file

@ -198,7 +198,9 @@ class LStemplate extends LSlog_staticLoggerClass {
self :: registerFunction("var_dump", "LStemplate_smarty_var_dump");
// Define public root URL
self :: assign('public_root_url', LSsession :: loadLSclass("LSurl") ? LSurl :: public_url() : null);
$public_root_url = LSsession :: loadLSclass("LSurl") ? LSurl :: public_url() : null;
// A trailing slash is appended by the template, handle special case of "/" root URL
self :: assign('public_root_url', $public_root_url == "/"?"":$public_root_url);
// Trigger started event
self :: fireEvent('started');