merging 6.2.10 and 6.2.11 changes
This commit is contained in:
parent
486b96d94d
commit
d47830aceb
28 changed files with 139 additions and 59 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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'";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue