From f678dc004db28f2d0a82e293ff8d380d33ab77f4 Mon Sep 17 00:00:00 2001 From: Banana Date: Sat, 28 May 2022 18:12:55 +0200 Subject: [PATCH] fixed #14 --- webroot/index.php | 6 ++++++ webroot/lib/summoner.class.php | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/webroot/index.php b/webroot/index.php index f56a216..913f235 100644 --- a/webroot/index.php +++ b/webroot/index.php @@ -111,10 +111,16 @@ if(file_exists('view/'.$ViewScript)) { if(!empty($TemplateData['refresh'])) { header("Location: ".$TemplateData['refresh']); + exit(); } # header information header('Content-type: text/html; charset=UTF-8'); +if($Summoner::simpleAuthCheck() === true) { + header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0"); + header("Cache-Control: post-check=0, pre-check=0", false); + header("Pragma: no-cache"); +} require 'view/_head.php'; require 'view/'.$View; diff --git a/webroot/lib/summoner.class.php b/webroot/lib/summoner.class.php index 15d4d45..2b4f88b 100644 --- a/webroot/lib/summoner.class.php +++ b/webroot/lib/summoner.class.php @@ -214,10 +214,10 @@ class Summoner { * * @param array $array * @param string $key - * @return bool + * @return mixed */ - static function ifset(array $array, string $key): bool { - return isset($array[$key]) ? $array[$key] : false; + static function ifset(array $array, string $key) { + return $array[$key] ?? false; } /** -- 2.39.5