diff options
Diffstat (limited to 'inc/confutils.php')
-rw-r--r-- | inc/confutils.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/inc/confutils.php b/inc/confutils.php index c18b92a02..d735b8b82 100644 --- a/inc/confutils.php +++ b/inc/confutils.php @@ -132,6 +132,21 @@ function getWordblocks() { } +function getSchemes() { + static $schemes = NULL; + if ( !$schemes ) { + $schemes = file(DOKU_CONF.'scheme.conf'); + if (@file_exists(DOKU_CONF.'scheme.local.conf')) { + $local = file(DOKU_CONF.'scheme.local.conf'); + $schemes = array_merge($schemes, $local); + } + } + $schemes = array_map('trim', $schemes); + $schemes = preg_replace('/^#.*/', '', $schemes); + $schemes = array_filter($schemes); + return $schemes; +} + /** * Builds a hash from a configfile * |