Skip to content

Commit

Permalink
Fixed issue #13236: Import LSS files from previous versions
Browse files Browse the repository at this point in the history
  • Loading branch information
lacrioque committed Feb 5, 2018
1 parent 672a9ea commit ff1822e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions application/controllers/admin/surveyadmin.php
Expand Up @@ -1300,6 +1300,19 @@ public function copy()
}
}

$oSurvey = Survey::model()->findByPk($aImportResults['newsid']);
LimeExpressionManager::SetDirtyFlag();
$oEM =& LimeExpressionManager::singleton();
@LimeExpressionManager::UpgradeConditionsToRelevance($aImportResults['newsid']);
@LimeExpressionManager::StartSurvey($oSurvey->sid,'survey',$oSurvey->attributes,true);
@LimeExpressionManager::StartProcessingPage(true,true);
$aGrouplist = QuestionGroup::model()->findAllByAttributes(['sid'=>$aImportResults['newsid']]);
foreach ($aGrouplist as $iGID => $aGroup) {
@LimeExpressionManager::StartProcessingGroup($aGroup['gid'], $oSurvey->anonymized != 'Y', $aImportResults['newsid']);
@LimeExpressionManager::FinishProcessingGroup();
}
@LimeExpressionManager::FinishProcessingPage();

$this->_renderWrappedTemplate('survey', 'importSurvey_view', $aData);
}

Expand Down

1 comment on commit ff1822e

@Shnoulle
Copy link
Collaborator

@Shnoulle Shnoulle commented on ff1822e Feb 23, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This break page if $aData['bFailed'] or $aImportResults['newsid'] is not set …

See :

if (isset($aImportResults['newsid'])) {

Please sign in to comment.