diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2001-07-07 15:19:29 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2001-07-07 15:19:29 +0000 |
commit | 7bd45884d8fd4e340289ad81b21855a3c12455ea (patch) | |
tree | 00bb4f16c3cf7aa100b20dad6a006807bc06f694 | |
parent | f12fa0615245760565dbc1fb53160c29243c63e2 (diff) | |
download | brdo-7bd45884d8fd4e340289ad81b21855a3c12455ea.tar.gz brdo-7bd45884d8fd4e340289ad81b21855a3c12455ea.tar.bz2 |
- Fixed naughty $op behaviour, causing block.module to go fubar.
-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) . "'"); |