Minor improvements (#887)

* Minor improvements

* Fixed
This commit is contained in:
Roman Kelesidis 2023-09-05 16:50:37 +07:00 committed by GitHub
commit 3c5a37fdb4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 94 additions and 106 deletions

View file

@ -34,6 +34,8 @@ if ($t_data['seeders'] > 2) {
$this->ajax_die(sprintf($lang['CALLSEED_MSG_SPAM'], $time_left));
}
$get_banned_users = get_banned_users() ? (', ' . implode(', ', get_banned_users())) : '';
$user_list = DB()->fetch_rowset("
SELECT DISTINCT dl.user_id, u.user_opt, tr.user_id as active_dl
FROM " . BB_BT_DLSTATUS . " dl
@ -41,7 +43,7 @@ $user_list = DB()->fetch_rowset("
LEFT JOIN " . BB_BT_TRACKER . " tr ON(tr.user_id = dl.user_id)
WHERE dl.topic_id = $topic_id
AND dl.user_status IN (" . DL_STATUS_COMPLETE . ", " . DL_STATUS_DOWN . ")
AND dl.user_id NOT IN ({$userdata['user_id']}, " . EXCLUDED_USERS . ", " . implode(', ', get_banned_users()) . ")
AND dl.user_id NOT IN ({$userdata['user_id']}, " . EXCLUDED_USERS . $get_banned_users . ")
AND u.user_active = 1
GROUP BY dl.user_id
");