From dd5eee545f77dc876d009aff6f71971d278f37ba Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 8 Feb 2007 20:54:57 +0100 Subject: compatibility fix for the recent render_TOC change render_TOC now behaves like before when called non-statically without an argument Fixes a problem in the config manager and probably other plugins using the function as well darcs-hash:20070208195457-7ad00-c84f60278e3917c31d2f915ad55f296f858b30c4.gz --- inc/parser/xhtml.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'inc/parser') diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 8f40bb5db..5390ae843 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -91,7 +91,9 @@ class Doku_Renderer_xhtml extends Doku_Renderer { * * @author Andreas Gohr */ - function render_TOC($toc){ + function render_TOC($toc=null){ + if(is_null($toc) && is_array($this->toc)) $toc = $this->toc; + if(count($toc) < 3) return ''; global $lang; $out = '
'.DOKU_LF; -- cgit v1.2.3