From 750218b829ad6e5c091775258634c89ce0c114f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B5nis=20Ormisson?= Date: Wed, 7 Jun 2017 18:43:33 +0300 Subject: [PATCH] Fixed issue #12426: The "Reset start/end date/time?" option of copying a survey doesn't work (#719) --- application/helpers/export_helper.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/application/helpers/export_helper.php b/application/helpers/export_helper.php index ae83a089cfe..d04787665d3 100644 --- a/application/helpers/export_helper.php +++ b/application/helpers/export_helper.php @@ -729,8 +729,15 @@ function surveyGetXMLStructure($iSurveyID, $xmlwriter, $exclude=array()) $squery = "SELECT * FROM {{surveys}} WHERE sid=$iSurveyID"; + //Exclude some fields from the export - buildXMLFromQuery($xmlwriter,$squery,'',array('owner_id','active','datecreated')); + $excludeFromSurvey = array('owner_id','active','datecreated'); + if (isset($exclude['dates']) && $exclude['dates']){ + $excludeFromSurvey[] = 'startdate'; + $excludeFromSurvey[] = 'expires'; + } + + buildXMLFromQuery($xmlwriter,$squery,'',$excludeFromSurvey); // Survey language settings $slsquery = "SELECT *