PMC-1306 Add new attribute mobile_offline_tables_download_interval related to the env.ini configuration

This commit is contained in:
Roly Rudy Gutierrez Pinto
2019-10-22 16:15:42 -04:00
parent 1ad3d6ad62
commit 9312229f83
5 changed files with 238 additions and 15 deletions

View File

@@ -73,7 +73,8 @@ class System
'files_white_list' => '',
'delay' => '0',
'tries' => '10',
'retry_after' => '90'
'retry_after' => '90',
'mobile_offline_tables_download_interval' => 24
];
/**
@@ -1203,6 +1204,15 @@ class System
$config['proxy_pass'] = G::decrypt($config['proxy_pass'], 'proxy_pass');
}
/**
* Here if you validate if the type of data obtained from the configuration
* files are valid, otherwise the default value is used.
*/
$value = (string) $config['mobile_offline_tables_download_interval'];
if (!is_numeric($value)) {
$config['mobile_offline_tables_download_interval'] = self::$defaultConfig['mobile_offline_tables_download_interval'];
}
return $config;
}