From e3eb22e2d8d7b3bd2413cfcb1badfbd81ee9dc54 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Thu, 31 Jul 2025 10:48:01 +0300 Subject: [PATCH] chore: Some minor improvements (#2068) --- library/ajax/change_torrent.php | 2 ++ library/ajax/post_mod_comment.php | 2 +- src/TorrServerAPI.php | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/library/ajax/change_torrent.php b/library/ajax/change_torrent.php index f4452239c..fd6de3bff 100644 --- a/library/ajax/change_torrent.php +++ b/library/ajax/change_torrent.php @@ -68,6 +68,7 @@ switch ($type) { case 'reg': \TorrentPier\Legacy\Torrent::tracker_register($attach_id); + // Log action $log_action->mod('mod_topic_tor_register', [ 'forum_id' => $torrent['forum_id'], 'topic_id' => $torrent['topic_id'], @@ -78,6 +79,7 @@ switch ($type) { case 'unreg': \TorrentPier\Legacy\Torrent::tracker_unregister($attach_id); + // Log action $log_action->mod('mod_topic_tor_unregister', [ 'forum_id' => $torrent['forum_id'], 'topic_id' => $torrent['topic_id'], diff --git a/library/ajax/post_mod_comment.php b/library/ajax/post_mod_comment.php index cca1c8e30..959f66ec6 100644 --- a/library/ajax/post_mod_comment.php +++ b/library/ajax/post_mod_comment.php @@ -27,7 +27,7 @@ $post = DB()->fetch_row(" WHERE p.post_id = $post_id "); if (!$post) { - $this->ajax_die('not post'); + $this->ajax_die($lang['TOPIC_POST_NOT_EXIST']); } $data = [ diff --git a/src/TorrServerAPI.php b/src/TorrServerAPI.php index 3764c56e6..190f2343c 100644 --- a/src/TorrServerAPI.php +++ b/src/TorrServerAPI.php @@ -54,7 +54,7 @@ class TorrServerAPI { global $bb_cfg; - $this->url = $bb_cfg['torr_server']['url'] . '/'; + $this->url = rtrim(trim($bb_cfg['torr_server']['url']), '/') . '/'; } /**