Skip to content

Commit

Permalink
Fixed two bugs on import when sql strict mode is activated
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/phpsurveyor@2828 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed May 1, 2007
1 parent aa4fdd9 commit 01c706d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion admin/importsurvey.php
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,6 @@
unset($surveyrowdata['email_register']);
unset($surveyrowdata['email_confirm_subj']);
unset($surveyrowdata['email_confirm']);

// import the survey language-specific settings
$values=array_values($surveylsrowdata);
$values=array_map(array(&$connect, "qstr"),$values); // quote everything accordingly
Expand All @@ -510,6 +509,8 @@



if (!isset($surveyrowdata['datecreated']) || $surveyrowdata['datecreated']=='') {$surveyrowdata['datecreated']=date("Y-m-d");}

$values=array_values($surveyrowdata);
$values=array_map(array(&$connect, "qstr"),$values); // quote everything accordingly
$insert = "INSERT INTO {$dbprefix}surveys (".implode(',',array_keys($surveyrowdata)).") VALUES (".implode(',',$values).")"; //handle db prefix
Expand Down Expand Up @@ -758,6 +759,7 @@
}
}
}
if (!isset($questionrowdata["question_order"]) || $questionrowdata["question_order"]=='') {$questionrowdata["question_order"]=0;}
$other = $questionrowdata["other"]; //Get 'other' field value
$newvalues=array_values($questionrowdata);
$newvalues=array_map(array(&$connect, "qstr"),$newvalues); // quote everything accordingly
Expand Down

0 comments on commit 01c706d

Please sign in to comment.