Added new constant TOR_TYPE_DEFAULT (#1698)

* Added new constant `TOR_TYPE_DEFAULT`

* Update tracker.php

* Update CHANGELOG.md
This commit is contained in:
Roman Kelesidis 2024-12-02 23:43:36 +07:00 committed by GitHub
commit 4382ec514b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 2 deletions

View file

@ -14,6 +14,7 @@
- Newtopic: Added configuring robots indexing [\#1599](https://github.com/torrentpier/torrentpier/pull/1599) ([belomaxorka](https://github.com/belomaxorka))
- Added showing releaser stats in profile [\#1568](https://github.com/torrentpier/torrentpier/pull/1568) ([belomaxorka](https://github.com/belomaxorka))
- Added ability to set country name manually [\#1652](https://github.com/torrentpier/torrentpier/pull/1652) ([belomaxorka](https://github.com/belomaxorka))
- Added new constant `TOR_TYPE_DEFAULT` [\#1698](https://github.com/torrentpier/torrentpier/pull/1698) ([belomaxorka](https://github.com/belomaxorka))
- Improved BitTorrent clients ban functionality [\#1657](https://github.com/torrentpier/torrentpier/pull/1657) ([belomaxorka](https://github.com/belomaxorka))
- Improved `filelist.php` [\#1586](https://github.com/torrentpier/torrentpier/pull/1586) ([belomaxorka](https://github.com/belomaxorka))
- Invites: Permanent invites feature [\#1670](https://github.com/torrentpier/torrentpier/pull/1670) ([belomaxorka](https://github.com/belomaxorka))

View file

@ -48,7 +48,7 @@ switch ($type) {
$tor_type = TOR_TYPE_GOLD;
$tor_type_lang = $lang['GOLD'];
} else {
$tor_type = 0;
$tor_type = TOR_TYPE_DEFAULT;
$tor_type_lang = "{$lang['UNSET_GOLD_TORRENT']} / {$lang['UNSET_SILVER_TORRENT']}";
}

View file

@ -106,6 +106,7 @@ define('TOR_PREMOD', 11);
define('TOR_REPLENISH', 12);
// Torrent types (Gold / Silver)
define('TOR_TYPE_DEFAULT', 0);
define('TOR_TYPE_GOLD', 1);
define('TOR_TYPE_SILVER', 2);

View file

@ -603,7 +603,7 @@ if ($allowed_forums) {
$SQL['WHERE'][] = "sn.seeders >= 1";
}
if ($tor_type) {
$SQL['WHERE'][] = "tor.tor_type IN(1,2)";
$SQL['WHERE'][] = "tor.tor_type IN(" . TOR_TYPE_GOLD . "," . TOR_TYPE_SILVER . ")";
}
if (!empty($status)) {
$SQL['WHERE'][] = "tor.tor_status IN(" . implode(', ', $status) . ")";