Fix: a registered user was not able to vote if a visitor had voted from the same ip

This commit is contained in:
Leendert Bottelberghs 2005-03-24 14:26:39 +00:00
parent 29e610d5a8
commit c3273e1d53

View file

@ -29,7 +29,7 @@ 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}'))");
and userId<>'1') or (userId=".quote($session{user}{userId})." and ipAddress='$session{env}{REMOTE_ADDR}'))");
return $hasVoted;
}