diff options
author | Dries Buytaert <dries@buytaert.net> | 2006-07-10 08:05:15 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2006-07-10 08:05:15 +0000 |
commit | d3e8a43d4fa34c54040ed8cafc26b43f2e53db78 (patch) | |
tree | b3192373e37417a0de05656dd9e6c90659f8c42a /modules/poll.module | |
parent | 6b2f4d681ad0c59fe6bf20f075a0187858269c2f (diff) | |
download | brdo-d3e8a43d4fa34c54040ed8cafc26b43f2e53db78.tar.gz brdo-d3e8a43d4fa34c54040ed8cafc26b43f2e53db78.tar.bz2 |
- Patch #72343 by Chris Johnson: removed checks for the moderate-flag from the SQL queries.
Diffstat (limited to 'modules/poll.module')
-rw-r--r-- | modules/poll.module | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/poll.module b/modules/poll.module index 1f2494da3..6e941d65e 100644 --- a/modules/poll.module +++ b/modules/poll.module @@ -52,10 +52,10 @@ function poll_block($op = 'list', $delta = 0) { } else if ($op == 'view') { // Retrieve the latest poll. - $sql = db_rewrite_sql("SELECT MAX(n.created) FROM {node} n INNER JOIN {poll} p ON p.nid = n.nid WHERE n.status = 1 AND p.active = 1 AND n.moderate = 0"); + $sql = db_rewrite_sql("SELECT MAX(n.created) FROM {node} n INNER JOIN {poll} p ON p.nid = n.nid WHERE n.status = 1 AND p.active = 1"); $timestamp = db_result(db_query($sql)); if ($timestamp) { - $poll = node_load(array('type' => 'poll', 'created' => $timestamp, 'moderate' => 0, 'status' => 1)); + $poll = node_load(array('type' => 'poll', 'created' => $timestamp, 'status' => 1)); if ($poll->nid) { // poll_view() dumps the output into $poll->body. @@ -276,7 +276,7 @@ function poll_node_info() { function poll_page() { // List all polls - $sql = "SELECT n.nid, n.title, p.active, n.created, SUM(c.chvotes) AS votes FROM {node} n INNER JOIN {poll} p ON n.nid = p.nid INNER JOIN {poll_choices} c ON n.nid = c.nid WHERE n.status = 1 AND n.moderate = 0 GROUP BY n.nid, n.title, p.active, n.created ORDER BY n.created DESC"; + $sql = "SELECT n.nid, n.title, p.active, n.created, SUM(c.chvotes) AS votes FROM {node} n INNER JOIN {poll} p ON n.nid = p.nid INNER JOIN {poll_choices} c ON n.nid = c.nid WHERE n.status = 1 GROUP BY n.nid, n.title, p.active, n.created ORDER BY n.created DESC"; $sql = db_rewrite_sql($sql); $result = pager_query($sql, 15); $output = '<ul>'; |