From 4a9a52be9bbc43a85b5e836eac544e099ab650bf Mon Sep 17 00:00:00 2001
From: Andreas Gohr <andi@splitbrain.org>
Date: Sat, 23 Jul 2005 22:48:24 +0200
Subject: [PATCH] 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
---
 inc/confutils.php | 20 ++++++++++++++++++--
 1 file 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}';
-- 
GitLab