Some bugfixes (#1380)

* Some bugfixes

* Update CHANGELOG.md

* Updated

* Update privmsg.php

* Update displaying_torrent.php

* Update privmsg.php
This commit is contained in:
Roman Kelesidis 2024-02-06 14:30:00 +07:00 committed by GitHub
commit 65d9f6d864
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 24 additions and 5 deletions

View file

@ -1,5 +1,13 @@
# 📖 Change Log
## [v2.4.2](https://github.com/torrentpier/torrentpier/tree/v2.4.2) (2024-XX-XX)
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.4.1...v2.4.2)
**Merged pull requests:**
- Release 2.4.2 🐯 ([belomaxorka](https://github.com/belomaxorka))
- Some bugfixes [\#1380](https://github.com/torrentpier/torrentpier/pull/1380) ([belomaxorka](https://github.com/belomaxorka))
## [v2.4.1](https://github.com/torrentpier/torrentpier/tree/v2.4.1) (2024-02-04)
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.4.0...v2.4.1)

View file

@ -127,6 +127,10 @@ switch ($field) {
$table = BB_BT_USERS;
$value = (float)str_replace(',', '.', $this->request['value']);
if ($value < 0.0) {
$this->ajax_die($lang['WRONG_INPUT']);
}
foreach (['KB' => 1, 'MB' => 2, 'GB' => 3, 'TB' => 4, 'PB' => 5, 'EB' => 6, 'ZB' => 7, 'YB' => 8] as $s => $m) {
if (stripos($this->request['value'], $s) !== false) {
$value *= (1024 ** $m);

View file

@ -153,7 +153,7 @@ if ($tor_reged && $tor_info) {
$dl_allowed = true;
$user_ratio = 0;
if (($min_ratio_dl || $min_ratio_warn) && $bt_user_id != $poster_id) {
if (($min_ratio_dl || $min_ratio_warn) && ($bt_user_id != $poster_id && $bt_user_id != GUEST_UID)) {
$sql = "SELECT u.*, dl.user_status
FROM " . BB_BT_USERS . " u
LEFT JOIN " . BB_BT_DLSTATUS . " dl ON dl.user_id = $bt_user_id AND dl.topic_id = $bt_topic_id

View file

@ -21,8 +21,8 @@ $bb_cfg = [];
$bb_cfg['js_ver'] = $bb_cfg['css_ver'] = 1;
// Version info
$bb_cfg['tp_version'] = 'v2.4.1';
$bb_cfg['tp_release_date'] = '04-02-2024';
$bb_cfg['tp_version'] = 'v2.4.2';
$bb_cfg['tp_release_date'] = 'XX-XX-2024';
$bb_cfg['tp_release_codename'] = 'Cattle';
// Database

View file

@ -62,6 +62,13 @@ $template->assign_vars([
'QUICK_REPLY' => $bb_cfg['show_quick_reply'] && $folder == 'inbox' && $mode == 'read',
]);
//
// Set mode for quick reply
//
if ($bb_cfg['show_quick_reply'] && $folder == 'inbox' && $mode == 'read' && $preview) {
$mode = 'reply';
}
//
// Cancel
//
@ -90,10 +97,9 @@ $outbox_url = ($folder != 'outbox' || $mode != '') ? '<a href="' . PM_URL . "?fo
$sentbox_url = ($folder != 'sentbox' || $mode != '') ? '<a href="' . PM_URL . "?folder=sentbox" . '">' . $lang['SENTBOX'] . '</a>' : $lang['SENTBOX'];
$savebox_url = ($folder != 'savebox' || $mode != '') ? '<a href="' . PM_URL . "?folder=savebox" . '">' . $lang['SAVEBOX'] . '</a>' : $lang['SAVEBOX'];
// ----------
//
// Start main
//
$template->assign_var('POSTING_SUBJECT');
if ($mode == 'read') {
@ -317,6 +323,7 @@ if ($mode == 'read') {
}
$s_hidden_fields = '<input type="hidden" name="mark[]" value="' . $privmsgs_id . '" />';
$s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" />';
$page_title = $lang['READ_PM'];