fix: Null $bb_cfg['tp_instance_hash'] (#1790)

This commit is contained in:
Roman Kelesidis 2025-02-02 08:32:26 +03:00 committed by GitHub
commit 602137b651
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -54,9 +54,9 @@ if (empty($bb_cfg['bt_announce_url']) || ($bb_cfg['bt_announce_url'] === 'https:
bb_update_config(['bt_announce_url' => FULL_URL . 'bt/announce.php']); bb_update_config(['bt_announce_url' => FULL_URL . 'bt/announce.php']);
} }
// [Demo mode] Allow registering torrents by default // [Demo mode] Allow registering torrents by default for "Your first forum"
if (IN_DEMO_MODE) { if (IN_DEMO_MODE) {
DB()->query("UPDATE " . BB_FORUMS . " SET allow_reg_tracker = 1 WHERE allow_reg_tracker = 0"); DB()->query("UPDATE " . BB_FORUMS . " SET allow_reg_tracker = 1 WHERE allow_reg_tracker = 0 AND forum_id = 1 LIMIT 1");
} }
// Create unique TorrentPier instance hash // Create unique TorrentPier instance hash

View file

@ -397,7 +397,7 @@ $userdata =& $user->data;
/** /**
* Some shared defines * Some shared defines
*/ */
define('TP_INSTANCE_HASH', $bb_cfg['tp_instance_hash']); define('TP_INSTANCE_HASH', !empty($bb_cfg['tp_instance_hash']) ? $bb_cfg['tp_instance_hash'] : '');
/** /**
* Cron * Cron