diff options
author | andi <andi@splitbrain.org> | 2005-04-26 20:13:58 +0200 |
---|---|---|
committer | andi <andi@splitbrain.org> | 2005-04-26 20:13:58 +0200 |
commit | 27a2b0851e6b7273beab68070c1e639454918da7 (patch) | |
tree | fdfa1756884133a40460279f0efa018acc8bca2c /inc/confutils.php | |
parent | 1e76272ce558ed88c5924606cc58507e14272960 (diff) | |
download | rpg-27a2b0851e6b7273beab68070c1e639454918da7.tar.gz rpg-27a2b0851e6b7273beab68070c1e639454918da7.tar.bz2 |
more interwiki fixes #273
darcs-hash:20050426181358-9977f-3b12ff92c5671e6703d67ad518379961042da0c3.gz
Diffstat (limited to 'inc/confutils.php')
-rw-r--r-- | inc/confutils.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/inc/confutils.php b/inc/confutils.php index c04d39896..4a38eeaac 100644 --- a/inc/confutils.php +++ b/inc/confutils.php @@ -88,10 +88,10 @@ function getEntities() { function getInterwiki() { static $wikis = NULL; if ( !$wikis ) { - $wikis = confToHash(DOKU_INC . 'conf/interwiki.conf'); + $wikis = confToHash(DOKU_INC . 'conf/interwiki.conf',true); } //add sepecial case 'this' - $wikis[] = 'this '.DOKU_URL.'{NAME}'; + $wikis['this'] = DOKU_URL.'{NAME}'; return $wikis; } @@ -100,7 +100,7 @@ function getInterwiki() { * * @author Harry Fuecks <hfuecks@gmail.com> */ -function confToHash($file) { +function confToHash($file,$lower=false) { $conf = array(); $lines = @file( $file ); if ( !$lines ) return $conf; @@ -112,7 +112,11 @@ function confToHash($file) { if(empty($line)) continue; $line = preg_split('/\s+/',$line,2); // Build the associative array - $conf[$line[0]] = $line[1]; + if($lower){ + $conf[strtolower($line[0])] = $line[1]; + }else{ + $conf[$line[0]] = $line[1]; + } } return $conf; |