Skip to content

Commit

Permalink
Dev: move createsurvey['token'] after createsurvey fielsmap creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Shnoulle committed Nov 6, 2012
1 parent d1e5833 commit af26196
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions application/helpers/admin/activate_helper.php
Expand Up @@ -207,9 +207,6 @@ function activateSurvey($iSurveyID, $simulate = false)
$fieldmap = createFieldMap($iSurveyID,true,false,getBaseLanguageFromSurveyID($iSurveyID));

$createsurvey = array();
if ($prow->anonymized == 'N') {
$createsurvey['token'] = "VARCHAR(36)";
}

foreach ($fieldmap as $q) //With each question, create the appropriate field(s)
{
Expand Down Expand Up @@ -248,7 +245,9 @@ function activateSurvey($iSurveyID, $simulate = false)
default:
$createsurvey[$q->fieldname] = $q->getDBField();
}

if ($prow->anonymized == 'N' && !array_key_exists('token',$createsurvey)) {
$createsurvey['token'] = "VARCHAR(36)";
}
if (is_a($q, 'QuestionModule') && $q->fileUpload()) $createsurveydirectory = true;

if ($simulate){
Expand Down

0 comments on commit af26196

Please sign in to comment.