diff options
author | andi <andi@splitbrain.org> | 2005-03-02 20:59:34 +0100 |
---|---|---|
committer | andi <andi@splitbrain.org> | 2005-03-02 20:59:34 +0100 |
commit | bd9d91308c26471024e5442d4201d77e38cd40f0 (patch) | |
tree | aa765ca8d9ccafda814c2dac1f6902113f64d0eb | |
parent | aee3d64b09bcbbecfd8ddaab5f9b3759d325091f (diff) | |
download | rpg-bd9d91308c26471024e5442d4201d77e38cd40f0.tar.gz rpg-bd9d91308c26471024e5442d4201d77e38cd40f0.tar.bz2 |
static interwiki array
darcs-hash:20050302195934-9977f-872ae2dc09f62fb2f55dbe7748c5a0503a1fef5c.gz
-rw-r--r-- | inc/format.php | 8 |
1 files 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}'; |