1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-05 08:07:33 +02:00

[core] Add configuration for bridges, allowing private bridges (#1343)

This commit is contained in:
Lyra
2020-12-12 17:05:22 +01:00
committed by GitHub
parent 56b2c516e4
commit 810a2503c9
4 changed files with 70 additions and 6 deletions

View File

@@ -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;
}
/**