Skip to content

Commit

Permalink
Dev: don't save empty value for not visible attribute
Browse files Browse the repository at this point in the history
Dev: still didn't work
  • Loading branch information
Shnoulle committed Oct 27, 2018
1 parent 29649c8 commit 3b6d830
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/controllers/admin/database.php
Expand Up @@ -569,7 +569,7 @@ private function actionUpdateQuestion($iSurveyID)
$aLanguages = array_merge(array(Survey::model()->findByPk($iSurveyID)->language), Survey::model()->findByPk($iSurveyID)->additionalLanguages);
foreach ($validAttributes as $validAttribute) {
/* Readonly attribute and visible==false: disable save */
if( $validAttribute['readonly'] || ( $validAttribute['readonly_when_active'] && Survey::model()->findByPk($iSurveyID)->getIsActive() ) ) {
if( !$validAttribute['visible'] || $validAttribute['readonly'] || ( $validAttribute['readonly_when_active'] && Survey::model()->findByPk($iSurveyID)->getIsActive() ) ) {
continue;
}
if ($validAttribute['i18n']) {
Expand Down

0 comments on commit 3b6d830

Please sign in to comment.