Ignore set last visit for AJAX pages - Fixes template change redirect

This commit is contained in:
slawkens
2025-10-21 12:18:56 +02:00
parent 16849e7578
commit 89fae38caa
9 changed files with 21 additions and 7 deletions

View File

@@ -34,8 +34,10 @@ if($logged) {
$twig->addGlobal('account_logged', $account_logged);
}
setSession('last_visit', time());
if(defined('PAGE')) {
setSession('last_page', PAGE);
if (!defined('IGNORE_SET_LAST_VISIT') || !IGNORE_SET_LAST_VISIT) {
setSession('last_visit', time());
if(defined('PAGE')) {
setSession('last_page', PAGE);
}
setSession('last_uri', $_SERVER['REQUEST_URI']);
}
setSession('last_uri', $_SERVER['REQUEST_URI']);