Added TorrentPier instance hash generation (#1726)

* Added `TorrentPier instance hash` generation

* Update CHANGELOG.md
This commit is contained in:
Roman Kelesidis 2024-12-31 12:16:59 +07:00 committed by GitHub
commit 11f5b50760
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 11 additions and 3 deletions

View file

@ -59,6 +59,11 @@ if (IN_DEMO_MODE) {
DB()->query("UPDATE " . BB_FORUMS . " SET allow_reg_tracker = 1 WHERE allow_reg_tracker = 0");
}
// Create unique TorrentPier instance hash
if (empty($bb_cfg['tp_instance_hash']) || ($bb_cfg['tp_instance_hash'] !== hash('xxh128', FULL_URL))) {
bb_update_config(['tp_instance_hash' => hash('xxh128', FULL_URL)]);
}
// Check for updates
$datastore->update('check_updates');