From 7a7334879c5f3acd9d69696ce6432c5b3e23e7a7 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Wed, 20 Dec 2023 23:15:48 +0700 Subject: [PATCH] Minor improvements (#1234) * Minor improvements * Update CHANGELOG.md --- CHANGELOG.md | 2 +- search.php | 2 +- viewforum.php | 2 +- viewtopic.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f5ba3563..2d745761d 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), [\#1229](https://github.com/torrentpier/torrentpier/pull/1229), [\#1230](https://github.com/torrentpier/torrentpier/pull/1230) ([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), [\#1230](https://github.com/torrentpier/torrentpier/pull/1230), [\#1234](https://github.com/torrentpier/torrentpier/pull/1234) ([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/search.php b/search.php index e837ef770..a31dc71ad 100644 --- a/search.php +++ b/search.php @@ -810,7 +810,7 @@ else { 'STATUS' => $topic['topic_status'], 'TYPE' => $topic['topic_type'], 'DL' => ($topic['topic_dl_type'] == TOPIC_DL_TYPE_DL), - 'POLL' => $topic['topic_vote'], + 'POLL' => !IS_GUEST && $topic['topic_vote'], 'DL_CLASS' => isset($topic['dl_status']) ? $dl_link_css[$topic['dl_status']] : '', 'TOPIC_AUTHOR' => profile_url(array('username' => $topic['first_username'], 'user_id' => $topic['first_user_id'], 'user_rank' => $topic['first_user_rank'])), diff --git a/viewforum.php b/viewforum.php index 0098f4ea0..4a6e627d1 100644 --- a/viewforum.php +++ b/viewforum.php @@ -461,7 +461,7 @@ foreach ($topic_rowset as $topic) { 'STATUS' => $topic['topic_status'], 'TYPE' => $topic['topic_type'], 'DL' => ($topic['topic_dl_type'] == TOPIC_DL_TYPE_DL && !$forum_data['allow_reg_tracker']), - 'POLL' => $topic['topic_vote'], + 'POLL' => !IS_GUEST && $topic['topic_vote'], 'DL_CLASS' => isset($topic['dl_status']) ? $dl_link_css[$topic['dl_status']] : '', 'TOPIC_AUTHOR' => profile_url(['username' => str_short($topic['first_username'], 15), 'user_id' => $topic['first_user_id'], 'user_rank' => $topic['first_user_rank']]), diff --git a/viewtopic.php b/viewtopic.php index e3d0a888a..69f444418 100644 --- a/viewtopic.php +++ b/viewtopic.php @@ -696,7 +696,7 @@ for ($i = 0; $i < $total_posts; $i++) { 'POSTER_BOT' => $poster_bot, 'POSTER_GUEST' => $poster_guest, 'POSTER_ID' => $poster_id, - 'POSTER_AUTHOR' => ($poster_id == $t_data['topic_poster']), + 'POSTER_AUTHOR' => !$poster_guest && ($poster_id == $t_data['topic_poster']), '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),