diff options
author | Andreas Gohr <andi@splitbrain.org> | 2012-01-07 14:11:47 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2012-01-07 14:13:14 +0100 |
commit | 9a2e250ac50cb5571b81b8d005a1f1edf7b8e17f (patch) | |
tree | 489507afe213e8c6ffc01f42268ca075744330f4 | |
parent | ee6bf45dd5a159e38e0dac99cc6afc6cf3df59e4 (diff) | |
download | rpg-9a2e250ac50cb5571b81b8d005a1f1edf7b8e17f.tar.gz rpg-9a2e250ac50cb5571b81b8d005a1f1edf7b8e17f.tar.bz2 |
make sure that sidebar TOCs won't interfere with page TOCs
This could happen if a sidebar is rendered before the page (populating
$TOC) and the page itself had no own TOC (no headers).
-rw-r--r-- | inc/template.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/inc/template.php b/inc/template.php index c70e407d6..476ef74a3 100644 --- a/inc/template.php +++ b/inc/template.php @@ -1354,9 +1354,12 @@ function tpl_license($img='badge',$imgonly=false,$return=false){ */ function tpl_include_page($pageid,$print=true){ global $ID; - $oldid = $ID; + global $TOC; + $oldid = $ID; + $oldtoc = $TOC; $html = p_wiki_xhtml($pageid,'',false); - $ID = $oldid; + $ID = $oldid; + $TOC = $oldtoc; if(!$print) return $html; echo $html; |