Skip to content

Commit

Permalink
Fixed a bug in import with null values and a small notice
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/stable+@3238 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed Aug 23, 2007
1 parent 37ba920 commit cd1d666
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion admin/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
`activate_survey`
*/

if ($surveyid)
if (isset($surveyid) && $surveyid)
{
$surquery = "SELECT * FROM {$dbprefix}surveys_rights WHERE sid=$surveyid AND uid = ".$_SESSION['loginID']; //Getting rights for this survey
$surresult = db_execute_assoc($surquery);
Expand Down
5 changes: 3 additions & 2 deletions admin/importsurvey.php
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@
$newlanguage='zh-Hans';
break;
case "chinese-traditional":
$newlanguage='zh-Hant';
$newlanguage='zh-Hant-HK';
break;
case "croatian":
$newlanguage='hr';
Expand Down Expand Up @@ -483,7 +483,7 @@

if (isset($surveyrowdata['datecreated'])) {$surveyrowdata['datecreated']=$connect->BindTimeStamp($surveyrowdata['datecreated']);}
if (isset($surveyrowdata['expires']) && $surveyrowdata['expires'] !='') {$surveyrowdata['expires']=$connect->BindTimeStamp($surveyrowdata['expires']);}
if (!isset($surveyrowdata['datecreated']) || $surveyrowdata['datecreated']=='') {$surveyrowdata['datecreated']=$connect->BindTimeStamp(date("Y-m-d"));}
if (!isset($surveyrowdata['datecreated']) || $surveyrowdata['datecreated']=='' || $surveyrowdata['datecreated']=='null') {$surveyrowdata['datecreated']=$connect->BindTimeStamp(date("Y-m-d"));}

$values=array_values($surveyrowdata);
$values=array_map(array(&$connect, "qstr"),$values); // quote everything accordingly
Expand Down Expand Up @@ -1047,6 +1047,7 @@

echo $clang->gT("Import of Survey is completed.")."\n";
if ($importwarning != "") echo "\n".$clang->gT("Warnings").":\n" . $importwarning . "\n";
$surveyid=$newsid;

}

Expand Down

0 comments on commit cd1d666

Please sign in to comment.