mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
Minor improvements (#1717)
* Minor improvements * Update callseed.php * Update CHANGELOG.md * Update index_data.php
This commit is contained in:
parent
1d51a2af84
commit
86e4b04333
4 changed files with 18 additions and 4 deletions
|
@ -27,11 +27,13 @@ if (!$t_data = topic_info($topic_id)) {
|
|||
|
||||
$forum_id = $t_data['forum_id'];
|
||||
|
||||
if ($t_data['seeders'] > 2) {
|
||||
if ($t_data['seeders'] >= 3) {
|
||||
$this->ajax_die(sprintf($lang['CALLSEED_HAVE_SEED'], $t_data['seeders']));
|
||||
} elseif ($t_data['call_seed_time'] > (TIMENOW - 86400)) {
|
||||
} elseif ($t_data['call_seed_time'] >= (TIMENOW - 86400)) {
|
||||
$time_left = delta_time($t_data['call_seed_time'] + 86400, TIMENOW, 'days');
|
||||
$this->ajax_die(sprintf($lang['CALLSEED_MSG_SPAM'], $time_left));
|
||||
} elseif (isset($bb_cfg['tor_no_tor_act'][$t_data['tor_status']])) {
|
||||
$this->ajax_die($lang['NOT_AVAILABLE']);
|
||||
}
|
||||
|
||||
$banned_users = ($get_banned_users = get_banned_users()) ? (', ' . implode(', ', $get_banned_users)) : '';
|
||||
|
@ -73,7 +75,7 @@ function topic_info($topic_id)
|
|||
|
||||
$sql = "
|
||||
SELECT
|
||||
tor.poster_id, tor.forum_id, tor.attach_id, tor.call_seed_time,
|
||||
tor.poster_id, tor.forum_id, tor.attach_id, tor.call_seed_time, tor.tor_status,
|
||||
t.topic_title, sn.seeders
|
||||
FROM " . BB_BT_TORRENTS . " tor
|
||||
LEFT JOIN " . BB_TOPICS . " t USING(topic_id)
|
||||
|
|
|
@ -17,6 +17,10 @@ if (!$bb_cfg['torr_server']['enabled']) {
|
|||
$this->ajax_die($lang['MODULE_OFF']);
|
||||
}
|
||||
|
||||
if ($bb_cfg['torr_server']['disable_for_guest'] && IS_GUEST) {
|
||||
$this->ajax_die($lang['NEED_TO_LOGIN_FIRST']);
|
||||
}
|
||||
|
||||
$attach_id = $this->request['attach_id'] ?? '';
|
||||
if (empty($attach_id) || !is_numeric($attach_id)) {
|
||||
$this->ajax_die($lang['INVALID_ATTACH_ID']);
|
||||
|
|
|
@ -118,6 +118,10 @@ switch ($mode) {
|
|||
break;
|
||||
|
||||
case 'releaser_stats':
|
||||
if (IS_GUEST) {
|
||||
$this->ajax_die($lang['NEED_TO_LOGIN_FIRST']);
|
||||
}
|
||||
|
||||
$user_id = (int)$this->request['user_id'];
|
||||
|
||||
$sql = "
|
||||
|
@ -150,6 +154,10 @@ switch ($mode) {
|
|||
$this->ajax_die($lang['MODULE_OFF']);
|
||||
}
|
||||
|
||||
if (IS_GUEST) {
|
||||
$this->ajax_die($lang['NEED_TO_LOGIN_FIRST']);
|
||||
}
|
||||
|
||||
$user_id = (int)$this->request['user_id'];
|
||||
$btu = get_bt_userdata($user_id);
|
||||
$profiledata = get_userdata($user_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue