From bd9d91308c26471024e5442d4201d77e38cd40f0 Mon Sep 17 00:00:00 2001 From: andi Date: Wed, 2 Mar 2005 20:59:34 +0100 Subject: static interwiki array darcs-hash:20050302195934-9977f-872ae2dc09f62fb2f55dbe7748c5a0503a1fef5c.gz --- inc/format.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/inc/format.php b/inc/format.php index b38bae3ab..7c4028930 100644 --- a/inc/format.php +++ b/inc/format.php @@ -244,9 +244,11 @@ function format_link_interwiki($link){ $url = 'http://www.google.com/search?q='; $ico = 'google'; - //load interwikilinks - //FIXME: loading this once may enhance speed a little bit - $iwlinks = file('conf/interwiki.conf'); + // Initialize as NULL - for the first fn call + static $iwlinks = NULL; + + // load interwikilinks if needed + if (!$iwlinks) $iwlinks = file('conf/interwiki.conf'); //add special case 'this' $iwlinks[] = 'this '.DOKU_URL.'{NAME}'; -- cgit v1.2.3