From 594e72126335466aee865633ca836fddec5253f3 Mon Sep 17 00:00:00 2001 From: cajus Date: Mon, 21 May 2007 11:34:41 +0000 Subject: [PATCH] Added debuglevel 128 for ACL debugging and removed the ACL debug output by default. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6421 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/functions.inc | 1 + include/smarty/plugins/block.render.php | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/functions.inc b/include/functions.inc index ef1139f16..5344d6780 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -56,6 +56,7 @@ define ("DEBUG_SHELL", 8); define ("DEBUG_POST", 16); define ("DEBUG_SESSION",32); define ("DEBUG_CONFIG", 64); +define ("DEBUG_ACL", 128); /* Rewrite german 'umlauts' and spanish 'accents' to get better results */ diff --git a/include/smarty/plugins/block.render.php b/include/smarty/plugins/block.render.php index dd26c6fd2..63e02b68f 100755 --- a/include/smarty/plugins/block.render.php +++ b/include/smarty/plugins/block.render.php @@ -13,7 +13,9 @@ function smarty_block_render($params, $text, &$smarty) unset($params['acl']); } - echo " ".$acl.""; + if (isset($_SESSION['DEBUGLEVEL']) && $_SESSION['DEBUGLEVEL'] & DEBUG_ACL ){ + echo " ".$acl.""; + } /* Read / Write*/ if(preg_match("/w/i",$acl)){ @@ -70,6 +72,7 @@ function smarty_block_render($params, $text, &$smarty) "\\1 \\2"); $text = preg_replace($from,$to,$text); $text = preg_replace("/GOSA_LINE_BREAK/","\n",$text); + return $text; } -- 2.30.2