From f77d7051c12b8e2847948be827e357119c11f600 Mon Sep 17 00:00:00 2001 From: Focuslinkstech <45756999+Focuslinkstech@users.noreply.github.com> Date: Thu, 10 Oct 2024 17:02:04 +0100 Subject: [PATCH] remove unused variable --- system/autoload/Admin.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/system/autoload/Admin.php b/system/autoload/Admin.php index 6ac427c7..8275d3b3 100644 --- a/system/autoload/Admin.php +++ b/system/autoload/Admin.php @@ -52,7 +52,6 @@ class Admin _alert(Lang::T('Token has expired. Please log in again.'), 'danger', "admin"); return 0; } else { - if (time() - $tmp[1] < 86400 * 7) { $_SESSION['aid'] = $tmp[0]; if ($enable_session_timeout) { @@ -78,8 +77,6 @@ class Admin // Detect the current protocol $isSecure = !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off'; - $serverHost = $_SERVER['HTTP_HOST']; - $app_stage = ($serverHost === 'localhost') ? '' : APP_URL; // Set cookie with security flags setcookie('aid', $token, [ 'expires' => time() + 86400 * 7, // 7 days @@ -109,8 +106,6 @@ class Admin global $_app_stage; if (isset($_COOKIE['aid'])) { $isSecure = !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off'; - $serverHost = $_SERVER['HTTP_HOST']; - $app_stage = ($serverHost === 'localhost') ? '' : APP_URL; setcookie('aid', '', [ 'expires' => time() - 3600, 'path' => '/',