diff options
-rw-r--r-- | modules/poll.module | 6 | ||||
-rw-r--r-- | modules/poll/poll.module | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/modules/poll.module b/modules/poll.module index 9141b1dea..2f388b803 100644 --- a/modules/poll.module +++ b/modules/poll.module @@ -101,11 +101,13 @@ function poll_graph($val) { function poll_view($node, $main = 0, $block = 0) { global $theme, $op, $user, $chid, $REQUEST_URI; + + $pollop = $op; if (($node->active) && (!field_get($node->voters, $user->userid))) $voting = 1; - if ((!$voting) && ($op != "View")) $op = "View"; + if ((!$voting) && ($pollop != "View")) $pollop = "View"; - switch ($op) { + switch ($pollop) { case "Vote": if (($node->active) && (!field_get($node->voters, $user->userid))) { $result = db_query("UPDATE poll_choices SET chvotes=chvotes+1 WHERE nid='" . $node->nid . "' && chid='" . check_input($chid) . "'"); diff --git a/modules/poll/poll.module b/modules/poll/poll.module index 9141b1dea..2f388b803 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -101,11 +101,13 @@ function poll_graph($val) { function poll_view($node, $main = 0, $block = 0) { global $theme, $op, $user, $chid, $REQUEST_URI; + + $pollop = $op; if (($node->active) && (!field_get($node->voters, $user->userid))) $voting = 1; - if ((!$voting) && ($op != "View")) $op = "View"; + if ((!$voting) && ($pollop != "View")) $pollop = "View"; - switch ($op) { + switch ($pollop) { case "Vote": if (($node->active) && (!field_get($node->voters, $user->userid))) { $result = db_query("UPDATE poll_choices SET chvotes=chvotes+1 WHERE nid='" . $node->nid . "' && chid='" . check_input($chid) . "'"); |