diff options
Diffstat (limited to 'includes/refresh.php')
-rw-r--r-- | includes/refresh.php | 14 |
1 files changed, 0 insertions, 14 deletions
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") { |