From 3d45a99f3a9522953aad5954e35a811dc4986725 Mon Sep 17 00:00:00 2001
From: Andreas Gohr <andi@splitbrain.org>
Date: Sat, 19 Jan 2008 00:04:42 +0100
Subject: [PATCH] partial fix for TOC displayed on deleted pages FS#1222

darcs-hash:20080118230442-7ad00-badb2e3dd61cb724e780e39488b68b5fb1f3ba7c.gz
---
 inc/template.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/inc/template.php b/inc/template.php
index d84aad8db..1dfa73955 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -152,7 +152,7 @@ function tpl_toc($return=false){
     if(is_array($TOC)){
         // if a TOC was prepared in global scope, always use it
         $toc = $TOC;
-    }elseif($ACT == 'show' && !$REV){
+    }elseif($ACT == 'show' && !$REV && $INFO['exists']){
         // get TOC from metadata, render if neccessary
         $meta = p_get_metadata($ID, false, true);
         if(isset($meta['internal']['toc'])){
-- 
GitLab