mirror of
https://github.com/standardebooks/web.git
synced 2025-07-14 02:21:55 -04:00
Improve handling of returning patrons
This commit is contained in:
parent
dbefba6b94
commit
32206f3cd7
10 changed files with 61 additions and 55 deletions
|
@ -49,10 +49,10 @@ class Vote extends PropertiesBase{
|
|||
}
|
||||
else{
|
||||
// Do we already have a vote for this poll, from this user?
|
||||
if( (Db::Query('
|
||||
SELECT count(*) as VoteCount from Votes v inner join
|
||||
if(Db::QueryInt('
|
||||
SELECT count(*) from Votes v inner join
|
||||
(select PollItemId from PollItems pi inner join Polls p on pi.PollId = p.PollId) x
|
||||
on v.PollItemId = x.PollItemId where v.UserId = ?', [$this->UserId]))[0]->VoteCount > 0){
|
||||
on v.PollItemId = x.PollItemId where v.UserId = ?', [$this->UserId]) > 0){
|
||||
$error->Add(new Exceptions\VoteExistsException());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue