mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-20 13:24:01 -07:00
Minor improvements (#1452)
* Minor improvements * Updated * Create updater.php * Revert "Create updater.php" This reverts commitbe2f3d5006
. * Revert "Updated" This reverts commit6aae9339cd
. * Updated * Update board_maintenance.php * Updated * Updated * Update build_check_updates.php * Updated * Update board_maintenance.php * Update functions.php * Updated * Update defines.php * Updated * Updated * Updater * Updated * Update .gitignore * Update * Update updater.php * Updated * Update tracker.php * Update .htaccess * Update tracker.php * Update tracker.tpl * Update CHANGELOG.md
This commit is contained in:
parent
b7b110906b
commit
24dbd25d9b
12 changed files with 110 additions and 39 deletions
|
@ -2132,3 +2132,28 @@ function getBanInfo(int $userId = null): ?array
|
|||
|
||||
return $bans[$userId] ?? [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Read updater file
|
||||
*
|
||||
* @return array|bool
|
||||
*/
|
||||
function readUpdaterFile(): array|bool
|
||||
{
|
||||
$str = [];
|
||||
|
||||
if ($updaterFile = fopen(UPDATER_FILE, 'r')) {
|
||||
while (!feof($updaterFile)) {
|
||||
$str[] = trim(fgets($updaterFile));
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($str)) {
|
||||
return [
|
||||
'previous_version' => (int)$str[0],
|
||||
'latest_version' => (int)$str[1],
|
||||
];
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue