config: Use global constant for config files

The configuration files are currently hard-coded in the configuration
classes and error messages. However, the implementation should not
rely on specific details like the file name. Instead, the files should
be part of the global definition.

This commit introduces two global constants for the configuration files

- FILE_CONFIG => 'config.ini.php'
- FILE_CONFIG_DEFAULT => 'config.default.ini.php'
This commit is contained in:
logmanoriginal 2019-06-07 19:45:47 +02:00
parent 946a99d334
commit ccf375e917
4 changed files with 35 additions and 31 deletions

View file

@ -41,6 +41,12 @@ define('WHITELIST', __DIR__ . '/../whitelist.txt');
/** Path to the default whitelist file */
define('WHITELIST_DEFAULT', __DIR__ . '/../whitelist.default.txt');
/** Path to the configuration file */
define('FILE_CONFIG', PATH_ROOT . 'config.ini.php');
/** Path to the default configuration file */
define('FILE_CONFIG_DEFAULT', PATH_ROOT . 'config.default.ini.php');
/** URL to the RSS-Bridge repository */
define('REPOSITORY', 'https://github.com/RSS-Bridge/rss-bridge/');