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

@@ -1,5 +1,6 @@
<?php
define('MYAAC_ADMIN', true);
const MYAAC_ADMIN = true;
const IGNORE_SET_LAST_VISIT = true;
require '../../common.php';
require SYSTEM . 'functions.php';

View File

@@ -26,6 +26,7 @@
use MyAAC\DataLoader;
const MYAAC_ADMIN = true;
const IGNORE_SET_LAST_VISIT = true;
require '../../common.php';
require SYSTEM . 'functions.php';

View File

@@ -3,6 +3,7 @@
use MyAAC\Settings;
const MYAAC_ADMIN = true;
const IGNORE_SET_LAST_VISIT = true;
require '../../common.php';
require SYSTEM . 'functions.php';

View File

@@ -1,5 +1,6 @@
<?php
define('MYAAC_ADMIN', true);
const MYAAC_ADMIN = true;
const IGNORE_SET_LAST_VISIT = true;
require '../../common.php';
require SYSTEM . 'init.php';

View File

@@ -1,5 +1,6 @@
<?php
define('MYAAC_ADMIN', true);
const MYAAC_ADMIN = true;
const IGNORE_SET_LAST_VISIT = true;
require '../../common.php';
require SYSTEM . 'functions.php';

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']);

View File

@@ -9,6 +9,8 @@
* @link https://my-aac.org
*/
const IGNORE_SET_LAST_VISIT = true;
// we need some functions
require '../common.php';
require SYSTEM . 'functions.php';

View File

@@ -1,4 +1,7 @@
<?php
const IGNORE_SET_LAST_VISIT = true;
require '../common.php';
require SYSTEM . 'init.php';
require SYSTEM . 'functions.php';

View File

@@ -12,6 +12,8 @@
use MyAAC\CreateCharacter;
use MyAAC\Models\Account;
const IGNORE_SET_LAST_VISIT = true;
// we need some functions
require '../common.php';
require SYSTEM . 'functions.php';