summaryrefslogtreecommitdiff
path: root/inc/pageutils.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/pageutils.php')
-rw-r--r--inc/pageutils.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/inc/pageutils.php b/inc/pageutils.php
index 02330e2a4..882a6bf56 100644
--- a/inc/pageutils.php
+++ b/inc/pageutils.php
@@ -58,6 +58,10 @@ function getID($param='id',$clean=true){
return $id;
}
+// function result cache for cleanID
+global $cache_cleanid;
+$cache_cleanid = array();
+
/**
* Remove unwanted chars from ID
*
@@ -73,7 +77,8 @@ function cleanID($raw_id,$ascii=false){
global $lang;
static $sepcharpat = null;
- static $cache = array();
+ global $cache_cleanid;
+ $cache = & $cache_cleanid;
// check if it's already in the memory cache
if (isset($cache[$raw_id])) {
@@ -140,6 +145,10 @@ function noNS($id) {
}
}
+// function result cache for wikiFN
+global $cache_wikifn;
+$cache_wikifn = array();
+
/**
* returns the full path to the datafile specified by ID and
* optional revision
@@ -151,7 +160,9 @@ function noNS($id) {
function wikiFN($raw_id,$rev='',$clean=true){
global $conf;
- static $cache = array();
+ global $cache_wikifn;
+ $cache = & $cache_wikifn;
+
if (isset($cache[$raw_id]) && isset($cache[$raw_id][$rev])) {
return $cache[$raw_id][$rev];
}