merging 6.2.10 and 6.2.11 changes

This commit is contained in:
JT Smith 2005-01-28 22:19:39 +00:00
parent 486b96d94d
commit d47830aceb
28 changed files with 139 additions and 59 deletions

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='1' and ipAddress='$session{env}{REMOTE_ADDR}'))");
return $hasVoted;
}

View file

@ -442,7 +442,7 @@ sub getResponseCount {
my $ipAddress = $self->getIp;
my $userId = $self->getUserId;
my ($count) = WebGUI::SQL->quickArray("select count(*) from Survey_response where Survey_id=".quote($self->get("Survey_id"))." and
((userId<>1 and userId=".quote($userId).") or ( userId=1 and ipAddress=".quote($ipAddress)."))");
((userId<>'1' and userId=".quote($userId).") or ( userId='1' and ipAddress=".quote($ipAddress)."))");
return $count;
}

View file

@ -318,7 +318,7 @@ sub view {
if ($constraints ne "") {
$constraints = "USS_submission.status='Approved' and ".$constraints;
} else {
$constraints = "(USS_submission.status='Approved' or (USS_submission.userId=".quote($session{user}{userId})." and USS_submission.userId<>1)";
$constraints = "(USS_submission.status='Approved' or (USS_submission.userId=".quote($session{user}{userId})." and USS_submission.userId<>'1')";
if ($var{canModerate}) {
$constraints .= " or USS_submission.status='Pending'";
}