mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-09-01 08:15:57 +02:00
[core] Add configuration for bridges, allowing private bridges (#1343)
This commit is contained in:
parent
56b2c516e4
commit
810a2503c9
4 changed files with 70 additions and 6 deletions
|
@ -145,10 +145,7 @@ final class Configuration {
|
|||
// Replace default configuration with custom settings
|
||||
foreach(parse_ini_file(FILE_CONFIG, true, INI_SCANNER_TYPED) as $header => $section) {
|
||||
foreach($section as $key => $value) {
|
||||
// Skip unknown sections and keys
|
||||
if(array_key_exists($header, Configuration::$config) && array_key_exists($key, Configuration::$config[$header])) {
|
||||
Configuration::$config[$header][$key] = $value;
|
||||
}
|
||||
Configuration::$config[$header][$key] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -218,13 +215,11 @@ final class Configuration {
|
|||
* @return mixed|null The parameter value.
|
||||
*/
|
||||
public static function getConfig($section, $key) {
|
||||
|
||||
if(array_key_exists($section, self::$config) && array_key_exists($key, self::$config[$section])) {
|
||||
return self::$config[$section][$key];
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue