From f28b3e2d802281ab961688bd6801e3e141af513d Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Mon, 22 Jan 2024 14:48:39 +0700 Subject: [PATCH] Added `bt_announce_url` autofill (#1331) * `bt_announce_url` autofill * Update CHANGELOG.md --- CHANGELOG.md | 1 + install/sql/mysql.sql | 2 +- library/includes/init_bb.php | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 027d0ee82..a4571e89c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ **Merged pull requests:** - Release 2.4.1 🦉 ([belomaxorka](https://github.com/belomaxorka), [kovalensky](https://github.com/kovalensky)) +- Added `bt_announce_url` autofill [\#1331](https://github.com/torrentpier/torrentpier/pull/1331) ([belomaxorka](https://github.com/belomaxorka)) - Added support for fastly cdn [\#1327](https://github.com/torrentpier/torrentpier/pull/1327) ([belomaxorka](https://github.com/belomaxorka), [kovalensky](https://github.com/kovalensky)) - Use `target="_blank"` in admin for profile_url() redirects [\#1330](https://github.com/torrentpier/torrentpier/pull/1330) ([belomaxorka](https://github.com/belomaxorka)) - Used declensions for days in some cases [\#1310](https://github.com/torrentpier/torrentpier/pull/1310) ([belomaxorka](https://github.com/belomaxorka)) diff --git a/install/sql/mysql.sql b/install/sql/mysql.sql index 32c505ada..b79dd72e0 100644 --- a/install/sql/mysql.sql +++ b/install/sql/mysql.sql @@ -506,7 +506,7 @@ VALUES ('allow_autologin', '1'), ('birthday_check_day', '7'), ('bt_add_auth_key', '1'), ('bt_allow_spmode_change', '1'), - ('bt_announce_url', 'https://demo.torrentpier.com/bt/announce.php'), + ('bt_announce_url', ''), ('bt_disable_dht', '0'), ('bt_check_announce_url', '0'), ('bt_del_addit_ann_urls', '1'), diff --git a/library/includes/init_bb.php b/library/includes/init_bb.php index 323664e7c..25059af69 100644 --- a/library/includes/init_bb.php +++ b/library/includes/init_bb.php @@ -394,6 +394,11 @@ $user = new TorrentPier\Legacy\Common\User(); $userdata =& $user->data; +// Set announcer default URL +if (empty($bb_cfg['bt_announce_url'])) { + bb_update_config(['bt_announce_url' => FULL_URL . 'bt/announce.php']); +} + /** * Cron */