diff options
author | chris <chris@jalakai.co.uk> | 2007-08-05 18:38:33 +0200 |
---|---|---|
committer | chris <chris@jalakai.co.uk> | 2007-08-05 18:38:33 +0200 |
commit | 2bb0d5419919bf72dd2338b331ea1a4c40ec6cbc (patch) | |
tree | d88d5665bb99afb169fd808ae524d47e3a13b95c /inc | |
parent | b8595a660455f6778266779753c6238127664a28 (diff) | |
download | rpg-2bb0d5419919bf72dd2338b331ea1a4c40ec6cbc.tar.gz rpg-2bb0d5419919bf72dd2338b331ea1a4c40ec6cbc.tar.bz2 |
minor fixes for recent tpl_toc() patch
darcs-hash:20070805163833-9b6ab-82e8cd7ec37d163ccb552e3b6aee8c1f70e75f15.gz
Diffstat (limited to 'inc')
-rw-r--r-- | inc/html.php | 2 | ||||
-rw-r--r-- | inc/parser/xhtml.php | 2 | ||||
-rw-r--r-- | inc/template.php | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/inc/html.php b/inc/html.php index 58886dce5..3ae192c73 100644 --- a/inc/html.php +++ b/inc/html.php @@ -1292,7 +1292,7 @@ function html_mktocitem($link, $text, $level, $hash='#'){ return array( 'link' => $hash.$link, 'title' => $text, 'type' => 'ul', - 'level' => $level-$conf['toptoclevel']+1); + 'level' => $level); } /** diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index e22298fa3..aba44e8da 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -97,7 +97,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer { //handle TOC if($level >= $conf['toptoclevel'] && $level <= $conf['maxtoclevel']){ - $this->toc[] = html_mktocitem("#$id", $text, $level); + $this->toc[] = html_mktocitem("#$id", $text, $level-$conf['toptoclevel']+1); } } diff --git a/inc/template.php b/inc/template.php index 196aedb4b..1d812cab3 100644 --- a/inc/template.php +++ b/inc/template.php @@ -158,7 +158,7 @@ function tpl_toc($return=false){ if(isset($meta['internal']['toc'])){ $tocok = $meta['internal']['toc']; }else{ - $tokok = true; + $tocok = true; } $toc = $meta['description']['tableofcontents']; if(!$tocok || !is_array($toc) || count($toc) < 3){ |