lostwages/include/plugins register.php
Jeremy Newman
jnewman at wine.codeweavers.com
Fri Mar 3 10:41:46 CST 2006
ChangeSet ID: 23381
CVSROOT: /opt/cvs-commit
Module name: lostwages
Changes by: jnewman at winehq.org 2006/03/03 10:41:46
Modified files:
include/plugins: register.php
Log message:
added support for checkbox answers (array)
Patch: http://cvs.winehq.org/patch.py?id=23381
Old revision New revision Changes Path
1.3 1.4 +8 -1 lostwages/include/plugins/register.php
Index: lostwages/include/plugins/register.php
diff -u -p lostwages/include/plugins/register.php:1.3 lostwages/include/plugins/register.php:1.4
--- lostwages/include/plugins/register.php:1.3 3 Mar 2006 16:41:46 -0000
+++ lostwages/include/plugins/register.php 3 Mar 2006 16:41:46 -0000
@@ -43,7 +43,14 @@ else if ($_POST['submit'])
$fh = fopen($db_file, 'a');
foreach ($fields as $field)
{
- fwrite($fh, preg_replace("/[\t\r\n]+/", " ", stripslashes($_POST['q'][$field])));
+ if (is_array($_POST['q'][$field]))
+ {
+ fwrite($fh, preg_replace("/[\t\r\n]+/", " ", join(", ", $_POST['q'][$field])));
+ }
+ else
+ {
+ fwrite($fh, preg_replace("/[\t\r\n]+/", " ", stripslashes($_POST['q'][$field])));
+ }
fwrite($fh, "\t");
}
fwrite($fh, "\n");
More information about the wine-cvs
mailing list