diff --git a/sections/forums/poll_vote.php b/sections/forums/poll_vote.php index 2045753ae..5b5698f61 100644 --- a/sections/forums/poll_vote.php +++ b/sections/forums/poll_vote.php @@ -10,10 +10,10 @@ namespace Gazelle; $threadId = (int)($_POST['threadid'] ?? 0); $poll = new Manager\ForumPoll()->findById($threadId); if (is_null($poll)) { - Error404::error(); + Error404::error("No reference to that poll found"); } if ($poll->isClosed()) { - Error403::error(); + Error403::error("Sorry, the poll is closed"); } $answerList = $poll->answerList(); @@ -24,12 +24,12 @@ if (!isset($_POST['vote']) || !is_number($_POST['vote'])) {
- + $answer) { ?>
-


+



Voted: of total. (You may click on a choice to change your vote).
+ $answer) { - $choice = $vote[$i]; + } else { + foreach ($answerList as $i => $answer) { + $choice = $vote[$i]; ?> -
  • (%)
  • -
  • - - - -
  • +
  • (%)
  • +
  • + + + +
  • -
  • » (Abstain)
  • - +

  • ➔ (Abstain)
  • +
    Votes: total()) ?> - -
    Latest staff blog posts
    {% endif %} @@ -53,106 +53,109 @@
    Latest blog posts
    -{% if leaderboard %} +{% for entry in leaderboard %} +{% if loop.first %}
    Contest Leaderboard
    - {% for entry in leaderboard %} +{% endif %} - {% if loop.last and contest_rank %} - {% if contest_rank.position > 4 %} +{% if loop.last and contest_rank %} +{% if contest_rank.position > 4 %} - {% endif %} - {% if contest_rank.position > 3 %} +{% endif %} +{% if contest_rank.position > 3 %} - {% endif %} - {% endif %} - {% endfor %} +{% endif %} +{% endif %} +{% if loop.last %}
    {{ loop.index }} {{ entry.user_id|user_url }} {{ entry.entry_count|number_format }}

    {{ contest_rank.position|number_format }} {{ viewer.id|user_url }} {{ contest_rank.total|number_format }}
    View More
    -{% endif %} - -{%- if poll -%} +{% endif %} +{% endfor %} +{% if poll %}
    -
    Latest Poll 🗳{% if poll.isClosed %} [Closed]{% endif %}
    +
    Latest Poll 🗳{% if poll.isClosed %} [Closed]{% endif %}

    {{ poll.question }}

    - {% if poll.response(viewer) is not null %} +{% if poll.response(viewer) is not null %}
    Votes: {{ poll.total|number_format }}
    - {% else %} +{% else %}
    - {% for id, answer in poll.answerList %} +{% for id, answer in poll.answerList %}
    - {% endfor %} -


    +{% endfor %} +


    - {% endif %} +{% endif %}
    -{% endif -%} - +{% endif %}
    Stats