Skip to content

Commit

Permalink
Fixed issue: Wipe command was leaving some data
Browse files Browse the repository at this point in the history
Fixed issue: Demo command not activating surveys
  • Loading branch information
c-schmitz committed Mar 3, 2021
1 parent f70ca32 commit cba7197
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 6 additions & 2 deletions application/commands/DemomodeCommand.php
Expand Up @@ -133,8 +133,12 @@ private function _createDemo()
$surveysToActivate[] = $result['newsid'];
}
}
require_once(__DIR__ . '/../helpers/admin/activate_helper.php');
array_map('activateSurvey', $surveysToActivate);
//require_once(__DIR__ . '/../helpers/admin/activate_helper.php');
foreach ($surveysToActivate as $surveyID) {
$survey = \Survey::model()->findByPk($surveyID);
$surveyActivator = new SurveyActivator($survey);
$result = $surveyActivator->activate();
}
}
}

Expand Down
2 changes: 0 additions & 2 deletions application/commands/WipeCommand.php
Expand Up @@ -102,8 +102,6 @@ public function run($sArgument)
Yii::app()->db->createCommand($actquery)->execute();
$actquery = "delete from {{users}} where uid<>1";
Yii::app()->db->createCommand($actquery)->execute();
$actquery = "delete from {{survey_groups}} where gsid<>1";
Yii::app()->db->createCommand($actquery)->execute();
$actquery = "delete from {{surveys_groups}} where gsid<>1";
Yii::app()->db->createCommand($actquery)->execute();
$actquery = "delete from {{surveys_groupsettings}} where gsid>1";
Expand Down

0 comments on commit cba7197

Please sign in to comment.