Mercurial > hg > fapweb
changeset 329:899a3583666d
Yay, noscript voting also works now.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 28 Nov 2013 00:28:07 +0200 |
parents | 6dd62c3204aa |
children | 78521cac3a42 |
files | usrajax.php |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/usrajax.php Thu Nov 28 00:18:12 2013 +0200 +++ b/usrajax.php Thu Nov 28 00:28:07 2013 +0200 @@ -30,7 +30,7 @@ // Existed, thusly update $sql = stPrepareSQL( "UPDATE votes SET value=%d WHERE key_id=%d AND entry_id=%d", - $vote, $key_id, $eid); + $vote, $key_id, $entry_id); } return stExecSQL($sql); @@ -99,12 +99,13 @@ stError("Voting is not enabled."); else { + error_log("X: ".var_export($_REQUEST, TRUE)); foreach (stExecSQL("SELECT * FROM compos WHERE visible<>0 AND voting<>0") as $compo) { $cid = $compo["id"]; foreach (stExecSQL("SELECT * FROM entries WHERE compo_id=".$cid) as $entry) { - $value = stGetRequestItem("", 0); + $value = stGetRequestItem("ventry".$entry["id"], 0); if (!stUpdateVote($voteKeyId, $entry["id"], $value)) { stError("Could not set vote for compo #".$cid.", entry #".$entry["id"]);