diff options
author | Johannes Löthberg <johannes@kyriasis.com> | 2015-06-14 15:08:38 +0200 |
---|---|---|
committer | Lukas Fleischer <lfleischer@archlinux.org> | 2015-06-14 17:58:56 +0200 |
commit | 9ef7de05698bb5fb82cb63894262a68156228fd1 (patch) | |
tree | 21944d6bf6c9e4d6acc7273f18df1f32320f7302 /web/lib | |
parent | 3bc44963280758f9e057943081e0b7a2f5541aff (diff) | |
download | aur-9ef7de05698bb5fb82cb63894262a68156228fd1.tar.gz aur-9ef7de05698bb5fb82cb63894262a68156228fd1.tar.xz |
confparser: Split loading of config into own function
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'web/lib')
-rw-r--r-- | web/lib/confparser.inc.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/web/lib/confparser.inc.php b/web/lib/confparser.inc.php index 39779113..790aa0e6 100644 --- a/web/lib/confparser.inc.php +++ b/web/lib/confparser.inc.php @@ -1,11 +1,16 @@ <?php -function config_get($section, $key) { +function config_load() { global $AUR_CONFIG; if (!isset($AUR_CONFIG)) { $AUR_CONFIG = parse_ini_file("../../conf/config", true, INI_SCANNER_RAW); } +} + +function config_get($section, $key) { + global $AUR_CONFIG; + config_load(); return $AUR_CONFIG[$section][$key]; } |