diff --git a/CHANGELOG.md b/CHANGELOG.md
index 46bf1e90..cbf6fe58 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,7 +6,7 @@
**Merged pull requests:**
- Release v2.1.5-2023.09 🎉
-- Minor improvements [\#235](https://github.com/torrentpier/torrentpier-lts/pull/235) ([belomaxorka](https://github.com/belomaxorka))
+- Minor improvements [\#235](https://github.com/torrentpier/torrentpier-lts/pull/235), [\#236](https://github.com/torrentpier/torrentpier-lts/pull/236) ([belomaxorka](https://github.com/belomaxorka))
## [v2.1.5-2023.08](https://github.com/torrentpier/torrentpier-lts/tree/v2.1.5-2023.08) (2023-09-04)
[Full Changelog](https://github.com/torrentpier/torrentpier-lts/compare/v2.1.5-2023.07...v2.1.5-2023.08)
diff --git a/admin/admin_attach_cp.php b/admin/admin_attach_cp.php
index 31c404d8..96bf5aa4 100644
--- a/admin/admin_attach_cp.php
+++ b/admin/admin_attach_cp.php
@@ -496,7 +496,7 @@ if ($view == 'attachments')
$post_title = str_short($post_title, 30);
}
- $view_topic = BB_ROOT . 'viewtopic.php?' . POST_POST_URL . '=' . $ids[$j]['post_id'] . '#' . $ids[$j]['post_id'];
+ $view_topic = BB_ROOT . POST_URL . $ids[$j]['post_id'] . '#' . $ids[$j]['post_id'];
$post_titles[] = '' . $post_title . '';
}
@@ -553,4 +553,4 @@ if ($do_pagination && $total_rows > $bb_cfg['topics_per_page'])
generate_pagination('admin_attach_cp.php?view=' . $view . '&mode=' . $mode . '&order=' . $sort_order . '&uid=' . $uid, $total_rows, $bb_cfg['topics_per_page'], $start);
}
-print_page('admin_attach_cp.tpl', 'admin');
\ No newline at end of file
+print_page('admin_attach_cp.tpl', 'admin');
diff --git a/library/attach_mod/displaying_torrent.php b/library/attach_mod/displaying_torrent.php
index 1ad72c4e..f12b5e44 100644
--- a/library/attach_mod/displaying_torrent.php
+++ b/library/attach_mod/displaying_torrent.php
@@ -102,7 +102,7 @@ if (!$tor_reged)
'U_DOWNLOAD_LINK' => $download_link,
'FILESIZE' => $tor_file_size,
- 'DOWNLOAD_COUNT' => sprintf($lang['DOWNLOAD_NUMBER'], $download_count),
+ 'DOWNLOAD_COUNT' => declension((int)$download_count, 'times'),
'POSTED_TIME' => $tor_file_time,
));
@@ -231,11 +231,11 @@ if ($tor_reged && $tor_info)
'FILESIZE' => $tor_file_size,
'MAGNET' => $tor_magnet,
'HASH' => strtoupper(bin2hex($tor_info['info_hash'])),
- 'DOWNLOAD_COUNT' => sprintf($lang['DOWNLOAD_NUMBER'], $download_count),
+ 'DOWNLOAD_COUNT' => declension((int)$download_count, 'times'),
'REGED_TIME' => bb_date($tor_info['reg_time']),
'REGED_DELTA' => delta_time($tor_info['reg_time']),
'TORRENT_SIZE' => humn_size($tor_size),
- 'COMPLETED' => sprintf($lang['DOWNLOAD_NUMBER'], $tor_info['complete_count']),
+ 'COMPLETED' => declension((int)$tor_info['complete_count'], 'times'),
));
if ($comment)
@@ -252,7 +252,8 @@ if ($tor_reged && $tor_info)
'TOR_SIZE' => humn_size($tor_size),
'TOR_LONGEVITY' => delta_time($tor_info['reg_time']),
- 'TOR_COMPLETED' => declension($tor_info['complete_count'], 'times'),
+ 'TOR_COMPLETED' => declension((int)$tor_info['complete_count'], 'times'),
+ 'TOR_DOWNLOAD_COUNT' => declension((int)$download_count, 'times'),
));
}
@@ -433,7 +434,7 @@ if ($tor_reged && $tor_info)
if (!defined('SEEDER_EXIST'))
{
define('SEEDER_EXIST', true);
- $seed_order_action = "viewtopic.php?". POST_TOPIC_URL ."=$bt_topic_id&spmode=full#seeders";
+ $seed_order_action = TOPIC_URL . "$bt_topic_id&spmode=full#seeders";
$template->assign_block_vars("$x_full", array(
'SEED_ORD_ACT' => $seed_order_action,
@@ -586,7 +587,7 @@ if ($bb_cfg['bt_allow_spmode_change'] && $s_mode != 'full')
{
$template->assign_vars(array(
'PEERS_FULL_LINK' => true,
- 'SPMODE_FULL_HREF' => "viewtopic.php?". POST_TOPIC_URL ."=$bt_topic_id&spmode=full#seeders",
+ 'SPMODE_FULL_HREF' => TOPIC_URL . "$bt_topic_id&spmode=full#seeders",
));
}
diff --git a/library/includes/page_header.php b/library/includes/page_header.php
index 7ec5f58c..73c056e6 100644
--- a/library/includes/page_header.php
+++ b/library/includes/page_header.php
@@ -234,7 +234,7 @@ if (!empty($page_cfg['show_torhelp'][BB_SCRIPT]) && !empty($userdata['torhelp'])
foreach (DB()->fetch_rowset($sql) as $row)
{
- $torhelp_topics[] = ''. $row['topic_title'] .'';
+ $torhelp_topics[] = ''. $row['topic_title'] .'';
}
$template->assign_vars(array(
@@ -276,4 +276,4 @@ define('PAGE_HEADER_SENT', true);
if (!$bb_cfg['gzip_compress'])
{
flush();
-}
\ No newline at end of file
+}
diff --git a/modcp.php b/modcp.php
index bb440f29..823f9b0a 100644
--- a/modcp.php
+++ b/modcp.php
@@ -565,8 +565,8 @@ switch ($mode)
sync('forum', array($forum_id, $new_forum_id));
//bot
- $message = $lang['TOPIC_SPLIT'] .'
'. $lang['TOPIC_SPLIT_OLD'] .'';
- $message .= ' :: '. $lang['TOPIC_SPLIT_NEW'] .'';
+ $message = $lang['TOPIC_SPLIT'] . '
' . $lang['TOPIC_SPLIT_OLD'] . '';
+ $message .= ' :: ' . $lang['TOPIC_SPLIT_NEW'] . '';
// Log action
$log_action->mod('mod_topic_split', array(
diff --git a/posting.php b/posting.php
index 742c9c79..1bcd9d8f 100644
--- a/posting.php
+++ b/posting.php
@@ -712,7 +712,7 @@ $template->assign_vars(array(
'POSTER_RGROUPS' => isset($poster_rgroups) && !empty($poster_rgroups) ? $poster_rgroups : '',
'ATTACH_RG_SIG' => ($switch_rg_sig) ? $switch_rg_sig : false,
- 'U_VIEWTOPIC' => ($mode == 'reply') ? "viewtopic.php?" . POST_TOPIC_URL . "=$topic_id&postorder=desc" : '',
+ 'U_VIEWTOPIC' => ($mode == 'reply') ? TOPIC_URL . "$topic_id&postorder=desc" : '',
'S_NOTIFY_CHECKED' => ($notify_user) ? 'checked="checked"' : '',
'S_TYPE_TOGGLE' => $topic_type_toggle,
diff --git a/styles/templates/default/viewtopic_attach.tpl b/styles/templates/default/viewtopic_attach.tpl
index 153b6339..4f44ddb4 100644
--- a/styles/templates/default/viewtopic_attach.tpl
+++ b/styles/templates/default/viewtopic_attach.tpl
@@ -216,8 +216,8 @@