[geeklog-cvs] Geeklog-1.x/public_html/admin/plugins/polls index.php, 1.43, 1.44

Oliver ospiess at qs1489.pair.com
Mon Aug 20 05:25:14 EDT 2007


Update of /usr/home/geeklog2/cvsroot/geeklog/Geeklog-1.x/public_html/admin/plugins/polls
In directory qs1489.pair.com:/tmp/cvs-serv66412

Modified Files:
	index.php 
Log Message:
fixing poll plugin answer tables index to prevent overwriting of other values

Index: index.php
===================================================================
RCS file: /usr/home/geeklog2/cvsroot/geeklog/Geeklog-1.x/public_html/admin/plugins/polls/index.php,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** index.php	9 Aug 2007 07:03:12 -0000	1.43
--- index.php	20 Aug 2007 09:25:12 -0000	1.44
***************
*** 212,217 ****
                      $A[$i][$j] = addslashes ($A[$i][$j]);
                      $R[$i][$j] = addslashes ($R[$i][$j]);
!                     DB_save ($_TABLES['pollanswers'], 'pid, qid, aid, answer, votes, remark',
!                              "'$pid', '$k', $j+1, '{$A[$i][$j]}', {$V[$i][$j]}, '{$R[$i][$j]}'");
                      $v = $v + $V[$i][$j];
                  }
--- 212,219 ----
                      $A[$i][$j] = addslashes ($A[$i][$j]);
                      $R[$i][$j] = addslashes ($R[$i][$j]);
!                     $sql = "INSERT INTO {$_TABLES['pollanswers']} (pid, qid, aid, answer, votes, remark) VALUES "
!                         . "('$pid', '$k', " . ($j+1) . ", '{$A[$i][$j]}', {$V[$i][$j]}, '{$R[$i][$j]}');";
!                     echo $sql;
!                     DB_query($sql);
                      $v = $v + $V[$i][$j];
                  }




More information about the geeklog-cvs mailing list