mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-20 21:33:54 -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
|
* High-load capable, heavily configurable announcer
|
||||||
* Scrape support
|
* Scrape support
|
||||||
* FreeLeech
|
* FreeLeech
|
||||||
* [IndexNow](https://www.indexnow.org) support
|
|
||||||
* [TorrServer integration](https://github.com/YouROK/TorrServer) support
|
* [TorrServer integration](https://github.com/YouROK/TorrServer) support
|
||||||
* BitTorrent v2 support
|
* BitTorrent v2 support
|
||||||
* Event-based invite system
|
* Event-based invite system
|
||||||
|
|
|
@ -600,8 +600,7 @@ VALUES ('allow_autologin', '1'),
|
||||||
('premod', '0'),
|
('premod', '0'),
|
||||||
('tor_comment', '1'),
|
('tor_comment', '1'),
|
||||||
('terms', ''),
|
('terms', ''),
|
||||||
('show_board_start_index', '1'),
|
('show_board_start_index', '1');
|
||||||
('tp_instance_hash', '');
|
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for `bb_cron`
|
-- 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', '');
|
INSERT INTO `bb_config` VALUES ('tp_instance_hash', '');
|
||||||
|
|
||||||
// 2.4.5
|
// 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");
|
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
|
// Check for updates
|
||||||
$datastore->update('check_updates');
|
$datastore->update('check_updates');
|
||||||
|
|
|
@ -397,11 +397,6 @@ $user = new TorrentPier\Legacy\Common\User();
|
||||||
|
|
||||||
$userdata =& $user->data;
|
$userdata =& $user->data;
|
||||||
|
|
||||||
/**
|
|
||||||
* Some shared defines
|
|
||||||
*/
|
|
||||||
define('TP_INSTANCE_HASH', $bb_cfg['tp_instance_hash']);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cron
|
* Cron
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -45,7 +45,7 @@ class Updater
|
||||||
*/
|
*/
|
||||||
private const STREAM_CONTEXT = [
|
private const STREAM_CONTEXT = [
|
||||||
'http' => [
|
'http' => [
|
||||||
'header' => 'User-Agent: ' . APP_NAME . '-' . TP_INSTANCE_HASH,
|
'header' => 'User-Agent: ' . APP_NAME . '-' . TIMENOW,
|
||||||
'timeout' => 10,
|
'timeout' => 10,
|
||||||
'ignore_errors' => true
|
'ignore_errors' => true
|
||||||
]
|
]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue