changeset 76:78893039b1f6

Rename a variable.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 17 Oct 2013 18:10:39 +0300
parents 699f6db022d9
children 70c0b21f0781
files vsubmit.php
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/vsubmit.php	Thu Oct 17 17:09:19 2013 +0300
+++ b/vsubmit.php	Thu Oct 17 18:10:39 2013 +0300
@@ -3,20 +3,20 @@
 require "mconfig.inc.php";
 require "msite.inc.php";
 
-function stSubmitVotes($user_id)
+function stSubmitVotes($voter_id)
 {
   foreach ($compos as $id => $compo)
   foreach ($compo["entries"] as $eid => $entry)
   {
     $vote = stGetRequestItem("entry".$eid);
     $sql = stPrepareSQL("SELECT id FROM votes WHERE voter_id=%d AND entry_id=%d",
-      $user_id, $eid);
+      $voter_id, $eid);
 
     if (($res = stFetchSQLColumn($sql)) === false)
     {
       $sql = stPrepareSQL(
         "INSERT INTO votes (voter_id,entry_id,value) VALUES (%d,%d,%d)",
-        $user_id, $eid, $vote);
+        $voter_id, $eid, $vote);
 
       if (stExecSQL($sql) === false)
         return FALSE;
@@ -25,7 +25,7 @@
     {
       $sql = stPrepareSQL(
         "UPDATE votes SET value=%d WHERE voter_id=%d AND entry_id=%d",
-        $vote, $user_id, $eid);
+        $vote, $voter_id, $eid);
 
       if (stExecSQL($sql) === false)
         return FALSE;