diff options
author | Andreas Gohr <andi@splitbrain.org> | 2005-07-23 22:48:24 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2005-07-23 22:48:24 +0200 |
commit | 4a9a52be9bbc43a85b5e836eac544e099ab650bf (patch) | |
tree | 1b9d038515787313451bf61eea0f4210eedf9778 /inc/confutils.php | |
parent | d2ee49cef0fd47388b8a1ac8cb259dac5fb8c670 (diff) | |
download | rpg-4a9a52be9bbc43a85b5e836eac544e099ab650bf.tar.gz rpg-4a9a52be9bbc43a85b5e836eac544e099ab650bf.tar.bz2 |
Local configuration files #349
Local configs can now be added to the following files to make
updating simpler:
acronyms.local.conf
mime.local.conf
smileys.local.conf
entities.local.conf
interwiki.local.conf
darcs-hash:20050723204824-7ad00-18b8e238f41bce4d3ac25c89bff5b9abf33620f4.gz
Diffstat (limited to 'inc/confutils.php')
-rw-r--r-- | inc/confutils.php | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/inc/confutils.php b/inc/confutils.php index 329358f62..2bcd90b6b 100644 --- a/inc/confutils.php +++ b/inc/confutils.php @@ -37,6 +37,10 @@ function getMimeTypes() { static $mime = NULL; if ( !$mime ) { $mime = confToHash(DOKU_INC . 'conf/mime.conf'); + if (@file_exists(DOKU_INC . 'conf/mime.local.conf')) { + $local = confToHash(DOKU_INC . 'conf/mime.local.conf'); + $mime = array_merge($mime, $local); + } } return $mime; } @@ -50,8 +54,8 @@ function getAcronyms() { static $acronyms = NULL; if ( !$acronyms ) { $acronyms = confToHash(DOKU_INC . 'conf/acronyms.conf'); - if (@file_exists(DOKU_INC . 'conf/local.acronyms.conf')) { - $local = confToHash(DOKU_INC . 'conf/local.acronyms.conf'); + if (@file_exists(DOKU_INC . 'conf/acronyms.local.conf')) { + $local = confToHash(DOKU_INC . 'conf/acronyms.local.conf'); $acronyms = array_merge($acronyms, $local); } } @@ -67,6 +71,10 @@ function getSmileys() { static $smileys = NULL; if ( !$smileys ) { $smileys = confToHash(DOKU_INC . 'conf/smileys.conf'); + if (@file_exists(DOKU_INC . 'conf/smileys.local.conf')) { + $local = confToHash(DOKU_INC . 'conf/smileys.local.conf'); + $smileys = array_merge($smileys, $local); + } } return $smileys; } @@ -80,6 +88,10 @@ function getEntities() { static $entities = NULL; if ( !$entities ) { $entities = confToHash(DOKU_INC . 'conf/entities.conf'); + if (@file_exists(DOKU_INC . 'conf/entities.local.conf')) { + $local = confToHash(DOKU_INC . 'conf/entities.local.conf'); + $entities = array_merge($entities, $local); + } } return $entities; } @@ -93,6 +105,10 @@ function getInterwiki() { static $wikis = NULL; if ( !$wikis ) { $wikis = confToHash(DOKU_INC . 'conf/interwiki.conf',true); + if (@file_exists(DOKU_INC . 'conf/interwiki.local.conf')) { + $local = confToHash(DOKU_INC . 'conf/interwiki.local.conf'); + $wikis = array_merge($wikis, $local); + } } //add sepecial case 'this' $wikis['this'] = DOKU_URL.'{NAME}'; |