From 54a4f06ce4b289b7ff6f9f24b283c5cadccf6382 Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Tue, 22 May 2001 21:44:48 +0000 Subject: Let's hope fixing bugs will be just as easy next time :) This baby is fixed. --- modules/poll.module | 6 +++--- modules/poll/poll.module | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'modules') diff --git a/modules/poll.module b/modules/poll.module index 22902e975..9385db811 100644 --- a/modules/poll.module +++ b/modules/poll.module @@ -13,15 +13,15 @@ class Poll { } function poll_cron() { -/* $result = _node_get(array("type" => "poll")); + $result = _node_get(array("type" => "poll")); while ($poll = db_fetch_array($result)) { - if ($poll[active]) { + if (($poll[active]) && ($poll[runtime])) { if (($poll[timestamp] + $poll[runtime]) < time()) { $poll[active] = 0; node_save($poll, array(active)); } } - }*/ + } } function poll_get_choices_array($poll) { diff --git a/modules/poll/poll.module b/modules/poll/poll.module index 22902e975..9385db811 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -13,15 +13,15 @@ class Poll { } function poll_cron() { -/* $result = _node_get(array("type" => "poll")); + $result = _node_get(array("type" => "poll")); while ($poll = db_fetch_array($result)) { - if ($poll[active]) { + if (($poll[active]) && ($poll[runtime])) { if (($poll[timestamp] + $poll[runtime]) < time()) { $poll[active] = 0; node_save($poll, array(active)); } } - }*/ + } } function poll_get_choices_array($poll) { -- cgit v1.2.3