From c3273e1d531df80d17e00e874ff9fb18e81830f4 Mon Sep 17 00:00:00 2001 From: Leendert Bottelberghs Date: Thu, 24 Mar 2005 14:26:39 +0000 Subject: [PATCH] Fix: a registered user was not able to vote if a visitor had voted from the same ip --- lib/WebGUI/Asset/Wobject/Poll.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/WebGUI/Asset/Wobject/Poll.pm b/lib/WebGUI/Asset/Wobject/Poll.pm index e6a8307e0..be520f607 100644 --- a/lib/WebGUI/Asset/Wobject/Poll.pm +++ b/lib/WebGUI/Asset/Wobject/Poll.pm @@ -28,8 +28,8 @@ our @ISA = qw(WebGUI::Asset::Wobject); sub _hasVoted { my $self = shift; my ($hasVoted) = WebGUI::SQL->quickArray("select count(*) from Poll_answer - where assetId=".quote($self->getId)." and ((userId=".quote($session{user}{userId})." - and userId<>'1') or (userId='1' and ipAddress='$session{env}{REMOTE_ADDR}'))"); + where assetId=".quote($self->getId)." and ((userId=".quote($session{user}{userId})." + and userId<>'1') or (userId=".quote($session{user}{userId})." and ipAddress='$session{env}{REMOTE_ADDR}'))"); return $hasVoted; }