Index: /freepbx/trunk/install_amp =================================================================== --- /freepbx/trunk/install_amp (revision 10966) +++ /freepbx/trunk/install_amp (revision 10975) @@ -1152,5 +1152,5 @@ /* outn("Creating or updating freepbx_conf settings.."); -freepbx_settings_init(); +freepbx_settings_init(true); out("..OK"); */ Index: /freepbx/trunk/upgrades/2.9.0alpha1/migrate_ampconf.php =================================================================== --- /freepbx/trunk/upgrades/2.9.0alpha1/migrate_ampconf.php (revision 10969) +++ /freepbx/trunk/upgrades/2.9.0alpha1/migrate_ampconf.php (revision 10975) @@ -55,8 +55,9 @@ // Now let's initialize all the settings, if they happen to already exist for // some reason, this is ok as the define_conf_settings() method does not save the -// values back once defined, you must explicitly set them. +// values back once defined, you must explicitly set them. Don't commit to db, +// that is down a little further down anyhow. // outn(_("Initialize freepbx_conf settings..")); -freepbx_settings_init(); +freepbx_settings_init(false); out(_("ok")); Index: /freepbx/trunk/libfreepbx.install.php =================================================================== --- /freepbx/trunk/libfreepbx.install.php (revision 10972) +++ /freepbx/trunk/libfreepbx.install.php (revision 10975) @@ -388,5 +388,5 @@ // used by both install_amp and the framework install/upgrade script. // -function freepbx_settings_init() { +function freepbx_settings_init($commit_to_db = false) { global $amp_conf; @@ -1073,5 +1073,16 @@ foreach ($module_migrate as $setting => $type) { if (isset($amp_conf[$setting]) && !$freepbx_conf->conf_setting_exists($setting)) { - $mod_set['value'] = $amp_conf[$setting]; + $val = $amp_conf[$setting]; + + // since this came from a conf file, change any 'false' that will otherwise turn to true + // + if ($type == CONF_TYPE_BOOL) switch (strtolower($val)) { + case 'false': + case 'no': + case 'off': + $val = false; + break; + } + $mod_set['value'] = $val; $mod_set['type'] = $type; $freepbx_conf->define_conf_setting($setting,$mod_set); @@ -1079,4 +1090,6 @@ } - $freepbx_conf->commit_conf_settings(); -} + if ($commit_to_db) { + $freepbx_conf->commit_conf_settings(); + } +}