Skip to content
Snippets Groups Projects
Commit f42d1c75 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

option for disabling debug output

darcs-hash:20051027183410-7ad00-5ca48cf2d4058016f5cf07887d9eaa7b07a4043f.gz
parent a89b76cc
No related branches found
No related tags found
No related merge requests found
......@@ -37,6 +37,7 @@ $conf['deaccent'] = 1; //convert accented chars to unaccented
$conf['useheading'] = 0; //use the first heading in a page as its name
$conf['refcheck'] = 1; //check for references before deleting media files
$conf['refshow'] = 0; //how many references should be shown, 5 is a good value
$conf['allowdebug'] = 1; //make debug possible, disable after install! 0|1
/* Antispam Features */
......
......@@ -45,7 +45,7 @@
if(empty($ACT)) $ACT = 'show';
if($ACT == 'debug'){
if($conf['allowdebug'] && $ACT == 'debug'){
html_debug();
exit;
}
......
......@@ -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);
......
......@@ -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";
}
}
......
......@@ -14,8 +14,7 @@
$IMG = getID('media');
$ID = cleanID($_REQUEST['id']);
//FIXME remove me later
if($_REQUEST['debug']){
if($conf['allowdebug'] && $_REQUEST['debug']){
print '<pre>';
foreach(explode(' ','basedir userewrite baseurl useslash') as $x){
print '$'."conf['$x'] = '".$conf[$x]."';\n";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment