Show poll prefix for guests (#1417)

* Show poll results for guests

* Update viewtopic.php

* Revert "Update viewtopic.php"

This reverts commit fd3f7021a3.

* Update CHANGELOG.md
This commit is contained in:
Roman Kelesidis 2024-03-01 17:50:49 +07:00 committed by GitHub
commit d82c974a90
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 3 deletions

View file

@ -17,6 +17,7 @@
- Fixed issue with poll_users cleaning at every cron job startup [\#1390](https://github.com/torrentpier/torrentpier/pull/1390) ([belomaxorka](https://github.com/belomaxorka))
- Fixed Undefined variable $wordCensor [\#1400](https://github.com/torrentpier/torrentpier/pull/1400) ([belomaxorka](https://github.com/belomaxorka))
- Improved word censor 🤐 [\#1393](https://github.com/torrentpier/torrentpier/pull/1393) ([belomaxorka](https://github.com/belomaxorka))
- Show poll prefix for guests [\#1417](https://github.com/torrentpier/torrentpier/pull/1417) ([belomaxorka](https://github.com/belomaxorka))
- Used hashing for filenames generation [\#1385](https://github.com/torrentpier/torrentpier/pull/1385) ([belomaxorka](https://github.com/belomaxorka))
- Hide quote button if topic locked [\#1416](https://github.com/torrentpier/torrentpier/pull/1416) ([belomaxorka](https://github.com/belomaxorka))
- Minor improvements [\#1382](https://github.com/torrentpier/torrentpier/pull/1382), [\#1383](https://github.com/torrentpier/torrentpier/pull/1383), [\#1391](https://github.com/torrentpier/torrentpier/pull/1391), [\#1398](https://github.com/torrentpier/torrentpier/pull/1398), [\#1405](https://github.com/torrentpier/torrentpier/pull/1405), [\#1406](https://github.com/torrentpier/torrentpier/pull/1406), [\#1408](https://github.com/torrentpier/torrentpier/pull/1408), [\#1409](https://github.com/torrentpier/torrentpier/pull/1409), [\#1410](https://github.com/torrentpier/torrentpier/pull/1410), [\#1411](https://github.com/torrentpier/torrentpier/pull/1411) ([belomaxorka](https://github.com/belomaxorka))

View file

@ -796,7 +796,7 @@ else {
'STATUS' => $topic['topic_status'],
'TYPE' => $topic['topic_type'],
'DL' => ($topic['topic_dl_type'] == TOPIC_DL_TYPE_DL),
'POLL' => !IS_GUEST && $topic['topic_vote'],
'POLL' => (bool)$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'])),

View file

@ -458,7 +458,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' => !IS_GUEST && $topic['topic_vote'],
'POLL' => (bool)$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']]),

View file

@ -508,7 +508,7 @@ $template->assign_vars([
'U_SEARCH_SELF' => "search.php?uid={$userdata['user_id']}&t=$topic_id&dm=1",
'TOPIC_HAS_POLL' => $topic_has_poll,
'POLL_IS_EDITABLE' => (!$poll_time_expired),
'POLL_IS_EDITABLE' => !$poll_time_expired,
'POLL_IS_FINISHED' => ($t_data['topic_vote'] == POLL_FINISHED),
'CAN_MANAGE_POLL' => $can_manage_poll,
'CAN_ADD_POLL' => $can_add_poll