diff options
author | Minteck <contact@minteck.org> | 2022-10-18 08:59:09 +0200 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-10-18 08:59:09 +0200 |
commit | 2c4ae43e688a9873e86211ea0e7aeb9ba770dd77 (patch) | |
tree | 17848d95522dab25d3cdeb9c4a6450e2a234861f /includes/refresh.php | |
parent | 108525534c28013cfe1897c30e4565f9893f3766 (diff) | |
download | pluralconnect-2c4ae43e688a9873e86211ea0e7aeb9ba770dd77.tar.gz pluralconnect-2c4ae43e688a9873e86211ea0e7aeb9ba770dd77.tar.bz2 pluralconnect-2c4ae43e688a9873e86211ea0e7aeb9ba770dd77.zip |
Update
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") { |