diff --git a/CHANGELOG.md b/CHANGELOG.md index 0920799c1..ff5c75f3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ - Show torrent's announcers list in `filelist.php` page [\#1708](https://github.com/torrentpier/torrentpier/pull/1708) ([belomaxorka](https://github.com/belomaxorka)) - [Configurable] Show magnet-links for guests [\#1712](https://github.com/torrentpier/torrentpier/pull/1712) ([belomaxorka](https://github.com/belomaxorka)) - Set `cursor: pointer;` for buttons, inputs (buttons) [\#1710](https://github.com/torrentpier/torrentpier/pull/1710), [\#1711](https://github.com/torrentpier/torrentpier/pull/1711) ([belomaxorka](https://github.com/belomaxorka)) -- Minor improvements [\#1705](https://github.com/torrentpier/torrentpier/pull/1705), [\#1713](https://github.com/torrentpier/torrentpier/pull/1713), [\#1715](https://github.com/torrentpier/torrentpier/pull/1715) ([belomaxorka](https://github.com/belomaxorka)) +- Minor improvements [\#1705](https://github.com/torrentpier/torrentpier/pull/1705), [\#1713](https://github.com/torrentpier/torrentpier/pull/1713), [\#1715](https://github.com/torrentpier/torrentpier/pull/1715), [\#1717](https://github.com/torrentpier/torrentpier/pull/1717) ([belomaxorka](https://github.com/belomaxorka)) - New Crowdin updates [\#1704](https://github.com/torrentpier/torrentpier/pull/1704), [\#1706](https://github.com/torrentpier/torrentpier/pull/1706), [\#1714](https://github.com/torrentpier/torrentpier/pull/1714), [\#1716](https://github.com/torrentpier/torrentpier/pull/1716) ([Exileum](https://github.com/Exileum)) ## [v2.4.5-rc.1](https://github.com/torrentpier/torrentpier/tree/v2.4.5-rc.1) (2024-12-08) diff --git a/library/ajax/callseed.php b/library/ajax/callseed.php index 21cc1eff8..cef8a839b 100644 --- a/library/ajax/callseed.php +++ b/library/ajax/callseed.php @@ -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) diff --git a/library/ajax/ffprobe_info.php b/library/ajax/ffprobe_info.php index d7d7a3781..77a2f1940 100644 --- a/library/ajax/ffprobe_info.php +++ b/library/ajax/ffprobe_info.php @@ -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']); diff --git a/library/ajax/index_data.php b/library/ajax/index_data.php index d07738598..fe38fae53 100644 --- a/library/ajax/index_data.php +++ b/library/ajax/index_data.php @@ -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);