]> 91.132.146.200 Git - insipid.git/commitdiff
fixed #14
authorBanana <mail@bananas-playground.net>
Sat, 28 May 2022 16:12:55 +0000 (18:12 +0200)
committerBanana <mail@bananas-playground.net>
Sat, 28 May 2022 16:12:55 +0000 (18:12 +0200)
webroot/index.php
webroot/lib/summoner.class.php

index f56a216ee6896396d0c168e35f2bf31d687cccba..913f2359d164604e2e637599819ce3da7f1e7305 100644 (file)
@@ -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;
index 15d4d4595cb2530e5aa913b230f86e45cfea3ad0..2b4f88b9641d004f4729c0d3cffca4b8ec1f7516 100644 (file)
@@ -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;
        }
 
        /**