summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2005-10-27 20:34:10 +0200
committerAndreas Gohr <andi@splitbrain.org>2005-10-27 20:34:10 +0200
commitf42d1c75316f76b00c3e1b4ae7f890048ae1b117 (patch)
treedd8948778a2e8d01688377c4a32f00bd7436b4c2 /inc
parenta89b76cccd3c05c8ceb7ecc5e2cec8f606935c77 (diff)
downloadrpg-f42d1c75316f76b00c3e1b4ae7f890048ae1b117.tar.gz
rpg-f42d1c75316f76b00c3e1b4ae7f890048ae1b117.tar.bz2
option for disabling debug output
darcs-hash:20051027183410-7ad00-5ca48cf2d4058016f5cf07887d9eaa7b07a4043f.gz
Diffstat (limited to 'inc')
-rw-r--r--inc/common.php6
-rw-r--r--inc/parserutils.php6
2 files changed, 9 insertions, 3 deletions
diff --git a/inc/common.php b/inc/common.php
index e5ab385ca..531e11477 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -1120,6 +1120,12 @@ function check(){
}else{
msg('mb_string extension not available - PHP only replacements will be used',0);
}
+
+ if($conf['allowdebug']){
+ msg('Debugging support is enabled. If you don\'t need it you should set $conf[\'allowdebug\'] = 0',-1);
+ }else{
+ msg('Debugging support is disabled',1);
+ }
msg('Your current permission for this page is '.$INFO['perm'],0);
diff --git a/inc/parserutils.php b/inc/parserutils.php
index ba8d8df36..7a263bf22 100644
--- a/inc/parserutils.php
+++ b/inc/parserutils.php
@@ -90,16 +90,16 @@ function p_cached_xhtml($file){
{
//well then use the cache
$parsed = io_readfile($cache);
- $parsed .= "\n<!-- cachefile $cache used -->\n";
+ if($conf['allowdebug']) $parsed .= "\n<!-- cachefile $cache used -->\n";
}else{
$parsed = p_render('xhtml', p_cached_instructions($file),$info); //try to use cached instructions
if($info['cache']){
io_saveFile($cache,$parsed); //save cachefile
- $parsed .= "\n<!-- no cachefile used, but created -->\n";
+ if($conf['allowdebug']) $parsed .= "\n<!-- no cachefile used, but created -->\n";
}else{
@unlink($cache); //try to delete cachefile
- $parsed .= "\n<!-- no cachefile used, caching forbidden -->\n";
+ if($conf['allowdebug']) $parsed .= "\n<!-- no cachefile used, caching forbidden -->\n";
}
}