Author: Jorg Adam Sowa (jorgsowa)
Committer: GitHub (web-flow)
Pusher: TimWolla
Date: 2026-11-29T16:26:51+01:00

Commit: 
https://github.com/php/web-wiki/commit/fbd4b0439c9eda12d0eb204b32cc0fb04baa1632
Raw diff: 
https://github.com/php/web-wiki/commit/fbd4b0439c9eda12d0eb204b32cc0fb04baa1632.diff

Refuse doodle votes once the poll is closed (#51)

The vote form was hidden after closeon, but a POST still cast a new vote.

Changed paths:
  M  dokuwiki/lib/plugins/doodle/syntax.php


Diff:

diff --git a/dokuwiki/lib/plugins/doodle/syntax.php 
b/dokuwiki/lib/plugins/doodle/syntax.php
index e9f9ee4e..e00898a4 100755
--- a/dokuwiki/lib/plugins/doodle/syntax.php
+++ b/dokuwiki/lib/plugins/doodle/syntax.php
@@ -349,6 +349,11 @@ function render($mode, Doku_Renderer $renderer, $data) {
      * (If user is allowed to.)
      */
     function castVote() {
+        if ($this->params['closed']) {
+            $this->template['msg'] = $this->getLang('poll_closed');
+            return;
+        }
+
         $fullname          = hsc(trim($_REQUEST['fullname']));
         $selected_indexes  = $_REQUEST['selected_indexes'];  // may not be set 
when all checkboxes are deseleted.
 

Reply via email to