mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
confparser: Add function for checking if config section exists
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
9ef7de0569
commit
d8e32ce5e1
1 changed files with 7 additions and 0 deletions
|
@ -23,3 +23,10 @@ function config_get_bool($section, $key) {
|
|||
$val = strtolower(config_get($section, $key));
|
||||
return ($val == 'yes' || $val == 'true' || $val == '1');
|
||||
}
|
||||
|
||||
function config_section_exists($key) {
|
||||
global $AUR_CONFIG;
|
||||
config_load();
|
||||
|
||||
return array_key_exists($key, $AUR_CONFIG);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue