Mercurial > hg > fapweb
changeset 310:8098b5b80f8c
We won't be checking key validity while session is in progress, thus get rid
of the skeleton code.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 26 Nov 2013 23:35:00 +0200 |
parents | 7c9f9db89306 |
children | 2f46b6254ff2 |
files | usrajax.php |
diffstat | 1 files changed, 2 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/usrajax.php Tue Nov 26 23:34:24 2013 +0200 +++ b/usrajax.php Tue Nov 26 23:35:00 2013 +0200 @@ -68,10 +68,11 @@ stReloadSettings(); -$userKeyLen = stGetSetting("userKeyLength"); +$voteKeyId = stGetSessionItem("key_id"); $voteMin = stGetSetting("voteMin"); $voteMax = stGetSetting("voteMax"); + // // Handle the request // @@ -91,12 +92,6 @@ array(CHK_RANGE, VT_INT, array($voteMin, $voteMax), "Invalid vote value."))) { // Check if voting is enabled on the compo and voter is valid - $sql = stPrepareSQL("SELECT * FROM votekeys WHERE key=%s", stGetSessionItem("key")); - if (($votekey = stFetchSQL($sql)) !== false) - { - } - else - stError("Invalid data."); } break; @@ -105,12 +100,6 @@ stError("Voting is not enabled."); else { - $sql = stPrepareSQL("SELECT * FROM votekeys WHERE key=%s", stGetSessionItem("key")); - if (($votekey = stFetchSQL($sql)) !== false) - { - } - else - stError("Invalid data."); } break;