Revision 54e11642
Added by Renato Botelho almost 8 years ago
src/etc/inc/config.lib.inc | ||
---|---|---|
438 | 438 |
} |
439 | 439 |
} |
440 | 440 |
} |
441 |
if ($config['version'] == $g['latest_config']) { |
|
442 |
return; /* already at latest version */ |
|
443 |
} |
|
444 | 441 |
|
445 | 442 |
// Save off config version |
446 | 443 |
$prev_version = $config['version']; |
... | ... | |
451 | 448 |
include_once("upgrade_config_custom.inc"); |
452 | 449 |
} |
453 | 450 |
|
451 |
if ($config['version'] == $g['latest_config']) { |
|
452 |
additional_config_upgrade(); |
|
453 |
return; /* already at latest version */ |
|
454 |
} |
|
455 |
|
|
454 | 456 |
if (!is_array($config['system']['already_run_config_upgrade'])) { |
455 | 457 |
$config['system']['already_run_config_upgrade'] = array(); |
456 | 458 |
} |
... | ... | |
481 | 483 |
} |
482 | 484 |
} |
483 | 485 |
|
484 |
additional_config_upgrade(); |
|
485 |
|
|
486 |
$now = date("H:i:s"); |
|
487 |
log_error(sprintf(gettext("Ended Configuration upgrade at %s"), $now)); |
|
488 |
|
|
489 | 486 |
if ($prev_version != $config['version']) { |
487 |
$now = date("H:i:s"); |
|
488 |
log_error(sprintf(gettext("Ended Configuration upgrade at %s"), $now)); |
|
489 |
|
|
490 | 490 |
write_config(sprintf(gettext('Upgraded config version level from %1$s to %2$s'), $prev_version, $config['version'])); |
491 | 491 |
} |
492 |
|
|
493 |
additional_config_upgrade(); |
|
492 | 494 |
} |
493 | 495 |
|
494 | 496 |
/****f* config/safe_write_file |
Also available in: Unified diff
Always run additional_config_upgrade() and do it after config is written