Skip to content

Commit

Permalink
Merge branch 'task/zoho-L41-T393-hide-question' into task/zoho-L41-T3…
Browse files Browse the repository at this point in the history
…88-check-all-switches-for-int-in-db
  • Loading branch information
Trischi80 committed Feb 22, 2021
2 parents 622eee8 + 7492866 commit 5130316
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion application/config/version.php
Expand Up @@ -12,7 +12,7 @@
*/

$config['versionnumber'] = '4.4.9';
$config['dbversionnumber'] = 437;
$config['dbversionnumber'] = 438;
$config['buildnumber'] = '';
$config['updatable'] = true;
$config['templateapiversion'] = 3;
Expand Down
8 changes: 7 additions & 1 deletion application/controllers/QuestionAdministrationController.php
Expand Up @@ -2543,7 +2543,13 @@ private function unparseAndSetGeneralOptions($oQuestion, $dataSet)
* @todo document me
*
* @param Question $oQuestion
* @param array $dataSet
* @param array $dataSet these are the advancedSettings in an array like
* [display]
* [hidden]
* ...
* [logic]
* ...
*
* @return boolean
* @throws CHttpException
*/
Expand Down
9 changes: 9 additions & 0 deletions application/helpers/update/updatedb_helper.php
Expand Up @@ -3622,6 +3622,15 @@ function ($v) {
$oDB->createCommand()->update('{{settings_global}}', array('stg_value' => 437), "stg_name='DBVersion'");
$oTransaction->commit();
}
if($iOldDBVersion < 438){
$oTransaction = $oDB->beginTransaction();

$oDB->createCommand()->update('{{question_attributes}}', array('value' => '1'), "attribute = 'hidden' and value = 'Y'");
$oDB->createCommand()->update('{{question_attributes}}', array('value' => '0'), "attribute = 'hidden' and value = 'N'");

$oDB->createCommand()->update('{{settings_global}}', array('stg_value' => 438), "stg_name='DBVersion'");
$oTransaction->commit();
}
} catch (Exception $e) {
Yii::app()->setConfig('Updating', false);
$oTransaction->rollback();
Expand Down

0 comments on commit 5130316

Please sign in to comment.