added a logger message if 'max_historical_years' exceeds the maximum permitted of 5

This commit is contained in:
Jordi Sanfeliu 2013-10-29 13:02:48 +01:00
parent c95a772d09
commit 977ab39b98
1 changed files with 6 additions and 2 deletions

View File

@ -477,10 +477,14 @@ if(!$config{global_zoom}) {
logger("WARNING: the 'global_zoom' option is not valid or doesn't exist. Please consider upgrading your configuration file.");
$config{global_zoom} = 1;
}
if(!$config{max_historic_years} || $config{max_historic_years} > 5) {
logger("WARNING: the 'max_historic_years' option is not valid or doesn't exist. Please consider upgrading your configuration file.");
if(!$config{max_historic_years}) {
logger("WARNING: the 'max_historic_years' option doesn't exist. Please consider upgrading your configuration file.");
$config{max_historic_years} = 1;
}
if($config{max_historic_years} > 5) {
logger("WARNING: the 'max_historic_years' option exceeds the maximum years permitted (5).");
exit(0);
}
logger("Ok, done.") unless !$options{d};