summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2015-06-14 15:08:39 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2015-06-14 17:58:56 +0200
commitd8e32ce5e112d1441c24464003e971e010fee5ac (patch)
treeeb88ecfba5858780306c6984dc44572c4a8cb852 /web
parent9ef7de05698bb5fb82cb63894262a68156228fd1 (diff)
downloadaurweb-d8e32ce5e112d1441c24464003e971e010fee5ac.tar.xz
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>
Diffstat (limited to 'web')
-rw-r--r--web/lib/confparser.inc.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/web/lib/confparser.inc.php b/web/lib/confparser.inc.php
index 790aa0e..db44b36 100644
--- a/web/lib/confparser.inc.php
+++ b/web/lib/confparser.inc.php
@@ -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);
+}