summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/template.php7
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;