WIP: Added restoring corrupt TorrentPier files 🪛 (#1493)

* Added restoring corrupt files 🪛

* Update index.tpl

* Updated

* Updated

* Update build_files_integrity.php

* Update build_files_integrity.php

* Update build_files_integrity.php

* Updated

* Updater

* Update Updater.php

* Updated

* Update Updater.php

* Update build_check_updates.php

* Updated

* Updated

* Updated

* Update build_files_integrity.php

* Update build_files_integrity.php

* Updated

* Update checksums.md5

* Update build_files_integrity.php

* Updated

* Updated

* Update Updater.php

* Update CHANGELOG.md

* Updated

* Update index.tpl

* Update functions.php

* Update Updater.php
This commit is contained in:
Roman Kelesidis 2024-06-08 16:42:35 +07:00 committed by GitHub
commit 2cbf9ed743
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 259 additions and 102 deletions

View file

@ -2152,17 +2152,10 @@ function readUpdaterFile(): array|bool
return false;
}
$updaterFile = new SplFileObject(UPDATER_FILE, 'r');
$updaterFile->setFlags(SplFileObject::SKIP_EMPTY | SplFileObject::DROP_NEW_LINE);
$lines = [];
foreach ($updaterFile as $line) {
$lines[] = is_numeric($line) ? (int)$line : 0;
}
$decodedFile = json_decode(file_get_contents(UPDATER_FILE), true);
return [
'previous_version' => $lines[0],
'latest_version' => $lines[1]
'previous_version' => $decodedFile['previous_version'],
'latest_version' => $decodedFile['latest_version']
];
}