Twig session(key) function + reworked session functions to accept multi-array like in Laravel

Important: getSession returns NULL now instead of false if session value not found
This commit is contained in:
slawkens
2025-02-02 16:16:59 +01:00
parent de468a8dcd
commit b46ddb43d0
5 changed files with 36 additions and 7 deletions

View File

@@ -41,7 +41,7 @@ if(setting('core.template_allow_change'))
}
else {
$template_session = getSession('template');
if ($template_session !== false) {
if ($template_session) {
if (!preg_match("/[^A-z0-9_\-]/", $template_session)) {
$template_name = $template_session;
}