From 0b750209b6ead13c836852eb96bc6cc8f14de51f Mon Sep 17 00:00:00 2001 From: Dries Buytaert <dries@buytaert.net> Date: Mon, 19 Oct 2009 17:46:24 +0000 Subject: [PATCH] - Patch #607802 by catch: fixed broken database query. --- modules/poll/poll.module | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/poll/poll.module b/modules/poll/poll.module index 56e3d75c411c..d1f212435fb6 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -439,9 +439,9 @@ function poll_load($nodes) { $poll->choice = db_select('poll_choice', 'c') ->addTag('translatable') ->fields('c', array('chid', 'chtext', 'chvotes', 'weight')) - ->condition('c', 'nid', $node->nid) + ->condition('c.nid', $node->nid) ->orderBy('weight') - ->fetchAllAssoc('chid', PDO::FETCH_ASSOC); + ->execute()->fetchAllAssoc('chid', PDO::FETCH_ASSOC); // Determine whether or not this user is allowed to vote. $poll->allowvotes = FALSE; -- GitLab