From 2c4ae43e688a9873e86211ea0e7aeb9ba770dd77 Mon Sep 17 00:00:00 2001 From: Minteck Date: Tue, 18 Oct 2022 08:59:09 +0200 Subject: Update --- includes/refresh.php | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'includes/refresh.php') diff --git a/includes/refresh.php b/includes/refresh.php index e8e12dd..ff8d1eb 100644 --- a/includes/refresh.php +++ b/includes/refresh.php @@ -223,20 +223,6 @@ foreach (json_decode(file_get_contents("./data/ynmuc/members.json"), true) as $m $times["images-ynmuc-" . $member['id']] = microtime(true) - $currentOpStart2; } -$currentOpStart = microtime(true); -function isJson($string): bool { - json_decode($string); - return (json_last_error() === JSON_ERROR_NONE); -} - -foreach ($files as $file) { - if (trim(file_get_contents("./data/" . $file)) === "" || (isJson(trim(file_get_contents("./data/" . $file))) && isset(json_decode(trim(file_get_contents("./data/" . $file)), true)["message"])) && !str_ends_with($file, ".html")) { - $restored[] = $file; - copy("./data/backup/" . $file, "./data/" . $file); - } -} -$times["restore"] = microtime(true) - $currentOpStart; - echo("Backing up...\n"); if (date('i') === "00") { -- cgit