From bde4e341723f1f504448e86150fb171d76aef615 Mon Sep 17 00:00:00 2001 From: GalaxyMaster Date: Thu, 17 Apr 2008 22:52:33 +0200 Subject: call io_readWikiPage() instead of io_readfile() on page load A patch to call IO_READ_WIKIPAGE properly. Without this patch any plugin which wants to intercept IO_READ_WIKIPAGE will catch almost nothing. darcs-hash:20080417205233-ae67a-6a82f5c7e84e3b669bab5ecf062abbaad4406d4d.gz --- inc/parserutils.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'inc/parserutils.php') diff --git a/inc/parserutils.php b/inc/parserutils.php index a171dc0e6..323d6f766 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -33,7 +33,7 @@ function p_wiki_xhtml($id, $rev='', $excuse=true){ if($rev){ if(@file_exists($file)){ - $ret = p_render('xhtml',p_get_instructions(io_readfile($file)),$info); //no caching on old revisions + $ret = p_render('xhtml',p_get_instructions(io_readWikiPage($file,$id,$rev)),$info); //no caching on old revisions }elseif($excuse){ $ret = p_locale_xhtml('norev'); } @@ -75,7 +75,7 @@ function p_wiki_xhtml_summary($id, &$title, $rev='', $excuse=true){ if($rev){ if(@file_exists($file)){ //no caching on old revisions - $ins = p_get_instructions(io_readfile($file)); + $ins = p_get_instructions(io_readWikiPage($file,$id,$rev)); }elseif($excuse){ $ret = p_locale_xhtml('norev'); //restore ID (just in case) @@ -182,7 +182,7 @@ function p_cached_instructions($file,$cacheonly=false,$id='') { return $cache->retrieveCache(); } else if (@file_exists($file)) { // no cache - do some work - $ins = p_get_instructions(io_readfile($file)); + $ins = p_get_instructions(io_readWikiPage($file,$id)); if ($cache->storeCache($ins)) { $run[$file] = true; // we won't rebuild these instructions in the same run again } else { -- cgit v1.2.3