summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2002-06-01 19:34:32 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2002-06-01 19:34:32 +0000
commitf520a8b413fb9edd030802fdc6045f00529fa30a (patch)
treeb554d110c98758c9df40ef5ccebe3965c0cfdb94
parent38aaf5f35d8bc51f6792989a1a7732be5a1e7676 (diff)
downloadbrdo-f520a8b413fb9edd030802fdc6045f00529fa30a.tar.gz
brdo-f520a8b413fb9edd030802fdc6045f00529fa30a.tar.bz2
Fixed unmoderated polls already showing up in the side-block.
-rw-r--r--modules/poll.module4
-rw-r--r--modules/poll/poll.module4
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/poll.module b/modules/poll.module
index 1d5ade5c3..6f8f5c403 100644
--- a/modules/poll.module
+++ b/modules/poll.module
@@ -12,9 +12,9 @@ function poll_access($op, $node) {
}
function poll_block() {
- $timestamp = db_result(db_query("SELECT MAX(created) FROM node WHERE type='poll' AND status='1'"));
+ $timestamp = db_result(db_query("SELECT MAX(created) FROM node WHERE type='poll' AND status='1' AND moderate='0'"));
if ($timestamp) {
- $poll = node_load(array("type" => "poll", "created" => $timestamp, "status" => "1"));
+ $poll = node_load(array("type" => "poll", "created" => $timestamp, "moderate" => "0", "status" => "1"));
if ($poll->nid) {
// Poll_view dumps the output into $poll->body
poll_view($poll, 1, 1);
diff --git a/modules/poll/poll.module b/modules/poll/poll.module
index 1d5ade5c3..6f8f5c403 100644
--- a/modules/poll/poll.module
+++ b/modules/poll/poll.module
@@ -12,9 +12,9 @@ function poll_access($op, $node) {
}
function poll_block() {
- $timestamp = db_result(db_query("SELECT MAX(created) FROM node WHERE type='poll' AND status='1'"));
+ $timestamp = db_result(db_query("SELECT MAX(created) FROM node WHERE type='poll' AND status='1' AND moderate='0'"));
if ($timestamp) {
- $poll = node_load(array("type" => "poll", "created" => $timestamp, "status" => "1"));
+ $poll = node_load(array("type" => "poll", "created" => $timestamp, "moderate" => "0", "status" => "1"));
if ($poll->nid) {
// Poll_view dumps the output into $poll->body
poll_view($poll, 1, 1);