summaryrefslogtreecommitdiffstats
path: root/web/html
diff options
context:
space:
mode:
authorcanyonknight <canyonknight@gmail.com>2012-10-09 03:22:20 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2012-10-10 17:22:22 +0200
commitd94a9e72997b2ad87dbda8d050b3d5ad9f36bdde (patch)
tree93979c101b8d168c6cbc6d2b9271a3af95317834 /web/html
parent14b237ac53f13bc99d1f64f2e0cc21cd30b517b0 (diff)
downloadaur-d94a9e72997b2ad87dbda8d050b3d5ad9f36bdde.tar.gz
aur-d94a9e72997b2ad87dbda8d050b3d5ad9f36bdde.tar.xz
tu.php: Fix page showing a user hasn't voted when they have
An ended vote details page will report a user hasn't voted even when they have. This is a result of faulty logic that only checks if a user has voted if the vote is still running. Regression with commit c15441762c6f6ab4438eaf2854c0ee3146a98b30 Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/html')
-rw-r--r--web/html/tu.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/web/html/tu.php b/web/html/tu.php
index 5e85e787..e2f77127 100644
--- a/web/html/tu.php
+++ b/web/html/tu.php
@@ -42,10 +42,13 @@ if ($atype == "Trusted User" || $atype == "Developer") {
} else if ($row['User'] == username_from_sid($_COOKIE["AURSID"])) {
$canvote = 0;
$errorvote = __("You cannot vote in an proposal about you.");
- } else if (tu_voted($row['ID'], uid_from_sid($_COOKIE["AURSID"]))) {
+ }
+ if (tu_voted($row['ID'], uid_from_sid($_COOKIE["AURSID"]))) {
$canvote = 0;
$hasvoted = 1;
- $errorvote = __("You've already voted for this proposal.");
+ if ($isrunning) {
+ $errorvote = __("You've already voted for this proposal.");
+ }
}
if ($canvote == 1) {