From 27a2b0851e6b7273beab68070c1e639454918da7 Mon Sep 17 00:00:00 2001 From: andi Date: Tue, 26 Apr 2005 20:13:58 +0200 Subject: more interwiki fixes #273 darcs-hash:20050426181358-9977f-3b12ff92c5671e6703d67ad518379961042da0c3.gz --- inc/confutils.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'inc/confutils.php') 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 */ -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; -- cgit v1.2.3