Minor improvements (#1452)

* Minor improvements

* Updated

* Create updater.php

* Revert "Create updater.php"

This reverts commit be2f3d5006.

* Revert "Updated"

This reverts commit 6aae9339cd.

* 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:
Roman Kelesidis 2024-04-24 15:01:37 +07:00 committed by GitHub
commit 24dbd25d9b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 110 additions and 39 deletions

View file

@ -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;
}