Skip to content

Commit

Permalink
Fixed issue: "List question groups" menu item not properly working af…
Browse files Browse the repository at this point in the history
…ter update

Dev Code accidentally reverted on rebase
  • Loading branch information
c-schmitz committed Sep 15, 2021
1 parent 4094395 commit 03c4724
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions application/helpers/update/updatedb_helper.php
Expand Up @@ -4932,23 +4932,7 @@ function ($v) {
$oDB->createCommand()->update('{{settings_global}}', array('stg_value' => 473), "stg_name='DBVersion'");
$oTransaction->commit();
}

if ($iOldDBVersion < 474) {
$oTransaction = $oDB->beginTransaction();
$aDefaultSurveyMenuEntries = LsDefaultDataSets::getSurveyMenuEntryData();
foreach ($aDefaultSurveyMenuEntries as $aSurveymenuentry) {
if ($aSurveymenuentry['name'] == 'listQuestionGroups') {
if (SurveymenuEntries::model()->findByAttributes(['name' => $aSurveymenuentry['name']]) == null) {
$oDB->createCommand()->insert('{{surveymenu_entries}}', $aSurveymenuentry);
SurveymenuEntries::reorderMenu(2);
}
break;
}
}
$oDB->createCommand()->update('{{settings_global}}', array('stg_value' => 474), "stg_name='DBVersion'");
$oTransaction->commit();
}

// 474 was left out for technical reasons
if ($iOldDBVersion < 475) {
$oTransaction = $oDB->beginTransaction();
// Apply integrity fix before adding unique constraint.
Expand Down

0 comments on commit 03c4724

Please sign in to comment.