chore: Some minor improvements (#2068)

This commit is contained in:
Roman Kelesidis 2025-07-31 10:48:01 +03:00 committed by GitHub
commit e3eb22e2d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 2 deletions

View file

@ -68,6 +68,7 @@ switch ($type) {
case 'reg': case 'reg':
\TorrentPier\Legacy\Torrent::tracker_register($attach_id); \TorrentPier\Legacy\Torrent::tracker_register($attach_id);
// Log action
$log_action->mod('mod_topic_tor_register', [ $log_action->mod('mod_topic_tor_register', [
'forum_id' => $torrent['forum_id'], 'forum_id' => $torrent['forum_id'],
'topic_id' => $torrent['topic_id'], 'topic_id' => $torrent['topic_id'],
@ -78,6 +79,7 @@ switch ($type) {
case 'unreg': case 'unreg':
\TorrentPier\Legacy\Torrent::tracker_unregister($attach_id); \TorrentPier\Legacy\Torrent::tracker_unregister($attach_id);
// Log action
$log_action->mod('mod_topic_tor_unregister', [ $log_action->mod('mod_topic_tor_unregister', [
'forum_id' => $torrent['forum_id'], 'forum_id' => $torrent['forum_id'],
'topic_id' => $torrent['topic_id'], 'topic_id' => $torrent['topic_id'],

View file

@ -27,7 +27,7 @@ $post = DB()->fetch_row("
WHERE p.post_id = $post_id WHERE p.post_id = $post_id
"); ");
if (!$post) { if (!$post) {
$this->ajax_die('not post'); $this->ajax_die($lang['TOPIC_POST_NOT_EXIST']);
} }
$data = [ $data = [

View file

@ -54,7 +54,7 @@ class TorrServerAPI
{ {
global $bb_cfg; global $bb_cfg;
$this->url = $bb_cfg['torr_server']['url'] . '/'; $this->url = rtrim(trim($bb_cfg['torr_server']['url']), '/') . '/';
} }
/** /**