mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-20 13:24:01 -07:00
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:
parent
e36a5ee07a
commit
2cbf9ed743
12 changed files with 259 additions and 102 deletions
|
@ -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']
|
||||
];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue