Mercurial > hg > fapweb
diff usrajax.php @ 1104:0a2117349f46
s/true/TRUE/g; s/false/FALSE/g;
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 14 May 2019 14:45:36 +0300 |
parents | 95b74632cfe2 |
children |
line wrap: on
line diff
--- a/usrajax.php Tue May 14 14:12:42 2019 +0300 +++ b/usrajax.php Tue May 14 14:45:36 2019 +0300 @@ -18,7 +18,7 @@ $sql = stPrepareSQL("SELECT id FROM votes WHERE key_id=%d AND entry_id=%d", $key_id, $entry_id); - if (($res = stFetchSQLColumn($sql)) === false) + if (($res = stFetchSQLColumn($sql)) === FALSE) { // Didn't exist, insert it $sql = stPrepareSQL( @@ -85,7 +85,7 @@ // Check vote key validity // $sql = stPrepareSQL("SELECT * FROM userkeys WHERE id=%d", $userKeyId); -if (($key = stFetchSQL($sql)) === false) +if (($key = stFetchSQL($sql)) === FALSE) { stError("Userkey does not exist."); } @@ -101,7 +101,7 @@ case VOTE_ASSIGN: $sql = stPrepareSQL("SELECT id FROM attendees WHERE key_id=%d", $key["id"]); - if (stFetchSQL($sql) === false) + if (stFetchSQL($sql) === FALSE) stError("Userkey is not assigned to any user."); break; } @@ -127,11 +127,11 @@ // Check if the entry_id is actually valid stDBBeginTransaction(); $sql = stPrepareSQL("SELECT * FROM entries WHERE id=%d", $entry_id); - if (($entry = stFetchSQL($sql)) !== false) + if (($entry = stFetchSQL($sql)) !== FALSE) { // Check if the compo is valid for the entry $sql = stPrepareSQL("SELECT * FROM compos WHERE id=%d", $entry["compo_id"]); - if (($compo = stFetchSQL($sql)) !== false && $compo["voting"] != 0) + if (($compo = stFetchSQL($sql)) !== FALSE && $compo["voting"] != 0) stUpdateVote($userKeyId, $entry_id, $vote); } stDBCommitTransaction();