summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Vote.php4
-rw-r--r--i18n/en.json1
2 files changed, 5 insertions, 0 deletions
diff --git a/Vote.php b/Vote.php
index e72fb07..b7f9724 100644
--- a/Vote.php
+++ b/Vote.php
@@ -78,6 +78,10 @@ class VoteHooks {
array_push($lines, ['error' => $msg('vote-error-invalid-date'), 'line' => $line]);
continue;
}
+ if ($endDate && $vote['date'] > $endDate) {
+ array_push($lines, ['error' => $msg('vote-error-too-late'), 'line' => $line]);
+ continue;
+ }
if (!in_array($vote['vote'], self::$options)) {
array_push($lines, ['error' => $msg('vote-error-invalid-vote', '(YES, NO, ABSTAIN)'), 'line' => $line]);
continue;
diff --git a/i18n/en.json b/i18n/en.json
index e948cd7..1ca27ad 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -19,6 +19,7 @@
"vote-error-one-vote-per-page": "There can only be one active vote per page (and it has to be the first one).",
"vote-error-invalid-date": "invalid date",
"vote-error-invalid-vote": "invalid vote, expected one of $1",
+ "vote-error-too-late": "too late",
"vote-already-yes": "You already voted to approve.",
"vote-already-no": "You already voted to oppose.",
"vote-already-abstain": "You already chose to abstain.",