mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
revert: Added TorrentPier instance hash
generation
This commit is contained in:
parent
1b288a96e4
commit
eabf851ee6
6 changed files with 3 additions and 14 deletions
|
@ -34,7 +34,6 @@ and go from there. The documentation will be translated to english in the near f
|
|||
* High-load capable, heavily configurable announcer
|
||||
* Scrape support
|
||||
* FreeLeech
|
||||
* [IndexNow](https://www.indexnow.org) support
|
||||
* [TorrServer integration](https://github.com/YouROK/TorrServer) support
|
||||
* BitTorrent v2 support
|
||||
* Event-based invite system
|
||||
|
|
|
@ -600,8 +600,7 @@ VALUES ('allow_autologin', '1'),
|
|||
('premod', '0'),
|
||||
('tor_comment', '1'),
|
||||
('terms', ''),
|
||||
('show_board_start_index', '1'),
|
||||
('tp_instance_hash', '');
|
||||
('show_board_start_index', '1');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for `bb_cron`
|
||||
|
|
|
@ -154,3 +154,4 @@ INSERT INTO `bb_config` VALUES ('magnet_links_for_guests', '0');
|
|||
INSERT INTO `bb_config` VALUES ('tp_instance_hash', '');
|
||||
|
||||
// 2.4.5
|
||||
DELETE FROM `bb_config` WHERE `config_name` = 'tp_instance_hash';
|
||||
|
|
|
@ -59,10 +59,5 @@ if (IN_DEMO_MODE) {
|
|||
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
|
||||
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');
|
||||
|
|
|
@ -397,11 +397,6 @@ $user = new TorrentPier\Legacy\Common\User();
|
|||
|
||||
$userdata =& $user->data;
|
||||
|
||||
/**
|
||||
* Some shared defines
|
||||
*/
|
||||
define('TP_INSTANCE_HASH', $bb_cfg['tp_instance_hash']);
|
||||
|
||||
/**
|
||||
* Cron
|
||||
*/
|
||||
|
|
|
@ -45,7 +45,7 @@ class Updater
|
|||
*/
|
||||
private const STREAM_CONTEXT = [
|
||||
'http' => [
|
||||
'header' => 'User-Agent: ' . APP_NAME . '-' . TP_INSTANCE_HASH,
|
||||
'header' => 'User-Agent: ' . APP_NAME . '-' . TIMENOW,
|
||||
'timeout' => 10,
|
||||
'ignore_errors' => true
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue