Skip to content

Commit

Permalink
Making sure that we do not override existing configuration settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
tbelliard committed Mar 22, 2019
1 parent 4d5280f commit 8ce7f89
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions upgrade/install-1.0.11.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,14 @@
function upgrade_module_1_0_11($module)
{
# Added a new option. Set to NULL by default.
Configuration::updateValue('MOD_LCE_MAX_REAL_WEIGHT', null);
Configuration::updateValue('MOD_LCE_MAX_VOL_WEIGHT', null);
Configuration::updateValue('MOD_LCE_FORCE_WEIGHT_DIMS_TABLE', false);

if (!Configuration::get('MOD_LCE_MAX_REAL_WEIGHT')) {
Configuration::updateValue('MOD_LCE_MAX_REAL_WEIGHT', null);
}
if (!Configuration::get('MOD_LCE_MAX_VOL_WEIGHT')) {
Configuration::updateValue('MOD_LCE_MAX_VOL_WEIGHT', null);
}
if (!Configuration::get('MOD_LCE_FORCE_WEIGHT_DIMS_TABLE')) {
Configuration::updateValue('MOD_LCE_FORCE_WEIGHT_DIMS_TABLE', false);
}
return true;
}

0 comments on commit 8ce7f89

Please sign in to comment.