From 5adf2b8517c21845dd0b406dee910514ff78640d Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Sun, 25 Jun 2023 20:10:39 +0200 Subject: Updated 6 files and added 2 files (automated) --- includes/system/history.inc | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'includes/system') diff --git a/includes/system/history.inc b/includes/system/history.inc index 963e124..b879f6e 100644 --- a/includes/system/history.inc +++ b/includes/system/history.inc @@ -55,7 +55,7 @@ if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/history.json" $cache = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/history.json"), true); -function page() { global $lang; global $systemCommonName; global $systemID; global $app; global $switches; ?> +function page() { global $lang; global $systemCommonName; global $systemID; global $app; global $switches; global $isLoggedIn; global $isLowerLoggedIn; ?>
- "> + "> " style="width:24px;"> 1): ?> @@ -153,16 +153,20 @@ if (!isset($cache[$systemID]["private"]) || !isset($cache[$systemID]["public"])) $cache[$systemID]["private"] = ob_get_contents(); ob_end_clean(); - ob_start(); - $isLoggedInOldState = $isLoggedIn; - $isLowerLoggedInOldState = $isLowerLoggedIn; - $isLoggedIn = false; - $isLowerLoggedIn = false; - page(); - $isLoggedIn = $isLoggedInOldState; - $isLowerLoggedIn = $isLowerLoggedInOldState; - $cache[$systemID]["public"] = ob_get_contents(); - ob_end_clean(); + if ($systemID !== $app["other"]["id"]) { + ob_start(); + $isLoggedInOldState = $isLoggedIn; + $isLowerLoggedInOldState = $isLowerLoggedIn; + $isLoggedIn = false; + $isLowerLoggedIn = false; + page(); + $isLoggedIn = $isLoggedInOldState; + $isLowerLoggedIn = $isLowerLoggedInOldState; + $cache[$systemID]["public"] = ob_get_contents(); + ob_end_clean(); + } else { + $cache[$systemID]["public"] = ""; + } } echo($isLoggedIn ? $cache[$systemID]["private"] : $cache[$systemID]["public"]); file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/cache/history.json", json_encode($cache)); ?> -- cgit