From ea2a4271c2f25e91be30f24c41c74c2bc23fa2d9 Mon Sep 17 00:00:00 2001
From: Andreas Gohr <andi@splitbrain.org>
Date: Sat, 3 Mar 2007 20:50:08 +0100
Subject: [PATCH] only debug when in xhtml mode in parserutils.php

darcs-hash:20070303195008-7ad00-880996042e703973c56d38f803f79555256dbe84.gz
---
 inc/parserutils.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/inc/parserutils.php b/inc/parserutils.php
index 599ec659f..ef4541009 100644
--- a/inc/parserutils.php
+++ b/inc/parserutils.php
@@ -148,16 +148,16 @@ function p_cached_output($file, $format='xhtml', $id='') {
   $cache = new cache_renderer($id, $file, $format);
   if ($cache->useCache()) {
     $parsed = $cache->retrieveCache();
-    if($conf['allowdebug']) $parsed .= "\n<!-- cachefile {$cache->cache} used -->\n";
+    if($conf['allowdebug'] && $format=='xhtml') $parsed .= "\n<!-- cachefile {$cache->cache} used -->\n";
   } else {
     $parsed = p_render($format, p_cached_instructions($file,false,$id), $info);
 
     if ($info['cache']) {
       $cache->storeCache($parsed);               //save cachefile
-      if($conf['allowdebug']) $parsed .= "\n<!-- no cachefile used, but created {$cache->cache} -->\n";
+      if($conf['allowdebug'] && $format=='xhtml') $parsed .= "\n<!-- no cachefile used, but created {$cache->cache} -->\n";
     }else{
       $cache->removeCache();                     //try to delete cachefile
-      if($conf['allowdebug']) $parsed .= "\n<!-- no cachefile used, caching forbidden -->\n";
+      if($conf['allowdebug'] && $format=='xhtml') $parsed .= "\n<!-- no cachefile used, caching forbidden -->\n";
     }
   }
 
-- 
GitLab