summaryrefslogtreecommitdiff
path: root/inc/html.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2007-08-07 19:18:44 +0200
committerAndreas Gohr <andi@splitbrain.org>2007-08-07 19:18:44 +0200
commit7d91652a4c175e84188b2d8e2fe4e677dac251e8 (patch)
tree09fd4f16b551089adc7eb91c03ea7e562edebf26 /inc/html.php
parent00ce12dafb81a8d0cb1385660ddf4e8ad571ed19 (diff)
downloadrpg-7d91652a4c175e84188b2d8e2fe4e677dac251e8.tar.gz
rpg-7d91652a4c175e84188b2d8e2fe4e677dac251e8.tar.bz2
TOC fixed
This fixes some small bugs which were introduced with recent TOC changes darcs-hash:20070807171844-7ad00-fc09dd6d09b72927e64dfa41dd8b86fc20d86ed0.gz
Diffstat (limited to 'inc/html.php')
-rw-r--r--inc/html.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/inc/html.php b/inc/html.php
index 3ae192c73..35cb09d3a 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -1273,7 +1273,13 @@ function html_TOC($toc){
* Callback for html_buildlist
*/
function html_list_toc($item){
- return '<span class="li"><a href="'.$item['link'].'" class="toc">'.
+ if($item['hid']){
+ $link = '#'.$item['hid'];
+ }else{
+ $link = $item['link'];
+ }
+
+ return '<span class="li"><a href="'.$link.'" class="toc">'.
hsc($item['title']).'</a></span>';
}