From 5860551daa0f60103ad24e93da29f401a653f144 Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Fri, 29 Mar 2024 22:05:35 +0100 Subject: Updated 20 files, added 6 files, deleted 144 files and renamed .idea/ponycule.iml (automated) --- includes/init.inc | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'includes/init.inc') diff --git a/includes/init.inc b/includes/init.inc index 8773ba4..52c9ee2 100644 --- a/includes/init.inc +++ b/includes/init.inc @@ -11,27 +11,6 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $i if (in_array($toplevel, array_keys($pages))) { $title = $pages[$toplevel]["name"][$lang["_name"]]; - - if ($pages[$toplevel]["admin"]) { - $readOnly = false; - @file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/.test", "hello"); - - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/.test")) { - unlink($_SERVER['DOCUMENT_ROOT'] . "/includes/data/.test"); - } else { - $readOnly = true; - } - - if (!isset($emergencyHeader)) { - $emergencyHeader = false; - } - - if ($pages[$toplevel]["limited"]) { - if ((!$isLoggedIn && !$isLowerLoggedIn) || ($readOnly && !$emergencyHeader)) header("Location: /-/login/?return=/-/$toplevel") and die(); - } else { - if (!$isLoggedIn || ($readOnly && !$emergencyHeader)) header("Location: /-/login/?return=/-/$toplevel") and die(); - } - } } else { $title = $toplevel; -} \ No newline at end of file +} -- cgit