From fce24b1989d7b5b231924eb89271effef5a05c85 Mon Sep 17 00:00:00 2001 From: nlstart Date: Fri, 12 Aug 2011 19:37:36 +0000 Subject: [PATCH] Bugtracker #5257: finetune update polls when not using cookies. Thanks Fanat1k. --- e107_plugins/poll/poll_class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/e107_plugins/poll/poll_class.php b/e107_plugins/poll/poll_class.php index dd5b5703b..33c220cbc 100644 --- a/e107_plugins/poll/poll_class.php +++ b/e107_plugins/poll/poll_class.php @@ -256,8 +256,7 @@ class poll } $votep = implode(chr(1), $votes); $pollArray['poll_votes'] = $votep; - - $sql->db_Update("polls", "poll_votes = '$votep', poll_ip='".$poll_ip.$userid."^' WHERE poll_id=".$poll_id); + $sql->db_Update("polls", "poll_votes = '$votep'".($pollArray['poll_storage_method'] != POLL_MODE_COOKIE ? ", poll_ip='".$poll_ip.$userid."^'" : '')." WHERE poll_id=".$poll_id); echo "