diff options
author | Andreas Gohr <andi@splitbrain.org> | 2007-02-08 20:54:57 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2007-02-08 20:54:57 +0100 |
commit | dd5eee545f77dc876d009aff6f71971d278f37ba (patch) | |
tree | 578bd58dd121cffb0ed5e8cd2b31b83c1ca5593c | |
parent | cde6a01b90b199cd9d42a8e23a61d467992b6d67 (diff) | |
download | rpg-dd5eee545f77dc876d009aff6f71971d278f37ba.tar.gz rpg-dd5eee545f77dc876d009aff6f71971d278f37ba.tar.bz2 |
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
-rw-r--r-- | inc/parser/xhtml.php | 4 |
1 files changed, 3 insertions, 1 deletions
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 <andi@splitbrain.org> */ - 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 = '<div class="toc">'.DOKU_LF; |