diff --git a/inc/init.php b/inc/init.php index 13fb3a4bb6cab191be9272961b7f05f25ea2dacf..01d2f74697774ca6ae48ea7a6d7531536fa50ba9 100644 --- a/inc/init.php +++ b/inc/init.php @@ -24,8 +24,8 @@ else { error_reporting(DOKU_E_LEVEL); } // init memory caches - $cache_wikifn = array(); - $cache_cleanid = array(); + global $cache_wikifn; $cache_wikifn = array(); + global $cache_wikifn; $cache_cleanid = array(); //prepare config array() global $conf; diff --git a/inc/pageutils.php b/inc/pageutils.php index 758d34a9e99225c07aeb84ddb0e37a32f7cfa9ed..5fadd7a36c9a1e624b33567cf3019ab9e1c51bf2 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -58,10 +58,6 @@ function getID($param='id',$clean=true){ return $id; } -// function result cache for cleanID -global $cache_cleanid; -$cache_cleanid = array(); - /** * Remove unwanted chars from ID * @@ -145,10 +141,6 @@ 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 diff --git a/inc/utf8.php b/inc/utf8.php index 499952617fdd1cd35cdec3840532bc3b68379dc7..aa9594c420176341fe9737558bd0519d386a1e4b 100644 --- a/inc/utf8.php +++ b/inc/utf8.php @@ -137,9 +137,9 @@ function utf8_strlen($string){ function utf8_substr($str, $offset, $length = null) { if(UTF8_MBSTRING){ if( $length === null ){ - return (mb_substr($str, $offset)); + return mb_substr($str, $offset); }else{ - return (mb_substr($str, $offset, $length)); + return mb_substr($str, $offset, $length); } }