From 7341cb8b258c7882fba5c702cf1155a164916032 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Wed, 20 Dec 2023 09:33:42 +0700 Subject: [PATCH] Minor improvements (#1229) * Minor improvements * Update CHANGELOG.md --- CHANGELOG.md | 2 +- viewtopic.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99221cbd4..206849217 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,7 @@ - search.php parameter sanitizing [\#1213](https://github.com/torrentpier/torrentpier/pull/1213) ([kovalensky](https://github.com/kovalensky), [belomaxorka](https://github.com/belomaxorka)) - Limit execution time for forum file-listing [\#1211](https://github.com/torrentpier/torrentpier/pull/1211) ([kovalensky](https://github.com/kovalensky), [belomaxorka](https://github.com/belomaxorka)) - Some reported bugfixes [\#1214](https://github.com/torrentpier/torrentpier/pull/1214) ([belomaxorka](https://github.com/belomaxorka)) -- Minor improvements [\#1215](https://github.com/torrentpier/torrentpier/pull/1215), [\#1217](https://github.com/torrentpier/torrentpier/pull/1217), [\#1219](https://github.com/torrentpier/torrentpier/pull/1219), [\#1220](https://github.com/torrentpier/torrentpier/pull/1220), [\#1224](https://github.com/torrentpier/torrentpier/pull/1224), [\#1228](https://github.com/torrentpier/torrentpier/pull/1228) ([belomaxorka](https://github.com/belomaxorka)) +- Minor improvements [\#1215](https://github.com/torrentpier/torrentpier/pull/1215), [\#1217](https://github.com/torrentpier/torrentpier/pull/1217), [\#1219](https://github.com/torrentpier/torrentpier/pull/1219), [\#1220](https://github.com/torrentpier/torrentpier/pull/1220), [\#1224](https://github.com/torrentpier/torrentpier/pull/1224), [\#1228](https://github.com/torrentpier/torrentpier/pull/1228), [\#1229](https://github.com/torrentpier/torrentpier/pull/1229) ([belomaxorka](https://github.com/belomaxorka)) - Fixed extensions issue [\#1218](https://github.com/torrentpier/torrentpier/pull/1218) ([belomaxorka](https://github.com/belomaxorka)) - Fixed broken sorting in group.php [\#1221](https://github.com/torrentpier/torrentpier/pull/1221) ([belomaxorka](https://github.com/belomaxorka)) - Code re-formatting [\#1225](https://github.com/torrentpier/torrentpier/pull/1225) ([kovalensky](https://github.com/kovalensky)) diff --git a/viewtopic.php b/viewtopic.php index b737c7bba..e3d0a888a 100644 --- a/viewtopic.php +++ b/viewtopic.php @@ -569,7 +569,7 @@ for ($i = 0; $i < $total_posts; $i++) { $post_date = bb_date($postrow[$i]['post_time'], $bb_cfg['post_date_format']); $max_post_time = max($max_post_time, $postrow[$i]['post_time']); $poster_posts = !$poster_guest ? $postrow[$i]['user_posts'] : ''; - $poster_from = ($postrow[$i]['user_from'] && !$poster_guest) ? $postrow[$i]['user_from'] : ''; + $poster_from = ($postrow[$i]['user_from'] && !$poster_guest) ? wbr($postrow[$i]['user_from']) : ''; $poster_joined = !$poster_guest ? $lang['JOINED'] . ': ' . bb_date($postrow[$i]['user_regdate'], 'Y-m-d H:i') : ''; $poster_longevity = !$poster_guest ? delta_time($postrow[$i]['user_regdate']) : ''; $post_id = $postrow[$i]['post_id']; @@ -691,13 +691,13 @@ for ($i = 0; $i < $total_posts; $i++) { 'POSTER_JOINED' => $bb_cfg['show_poster_joined'] ? $poster_longevity : '', 'POSTER_JOINED_DATE' => $poster_joined, - 'POSTER_POSTS' => $bb_cfg['show_poster_posts'] ? '' . $poster_posts . '' : '', - 'POSTER_FROM' => $bb_cfg['show_poster_from'] ? wbr($poster_from) : '', + 'POSTER_POSTS' => ($bb_cfg['show_poster_posts'] && $poster_posts) ? '' . $poster_posts . '' : '', + 'POSTER_FROM' => $bb_cfg['show_poster_from'] ? $poster_from : '', 'POSTER_BOT' => $poster_bot, 'POSTER_GUEST' => $poster_guest, 'POSTER_ID' => $poster_id, 'POSTER_AUTHOR' => ($poster_id == $t_data['topic_poster']), - 'POSTER_GENDER' => genderImage((int)$postrow[$i]['user_gender']), + 'POSTER_GENDER' => !$poster_guest ? genderImage((int)$postrow[$i]['user_gender']) : '', 'POSTED_AFTER' => $prev_post_time ? delta_time($postrow[$i]['post_time'], $prev_post_time) : '', 'IS_UNREAD' => is_unread($postrow[$i]['post_time'], $topic_id, $forum_id), 'IS_FIRST_POST' => (!$start && $is_first_post),