Code

Added debuglevel 128 for ACL debugging and removed the ACL debug output by default.
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 21 May 2007 11:34:41 +0000 (11:34 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 21 May 2007 11:34:41 +0000 (11:34 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6421 594d385d-05f5-0310-b6e9-bd551577e9d8

include/functions.inc
include/smarty/plugins/block.render.php

index ef1139f16f2b37c03dc019df0bfae0ce665942e1..5344d6780ad91b4d2f19a04ea5bd847179f5797b 100644 (file)
@@ -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 */
index dd26c6fd2bad76f4a8c8e454fae037455d5ffae3..63e02b68f6d1e9b25ec20111329f078844435ca9 100755 (executable)
@@ -13,7 +13,9 @@ function smarty_block_render($params, $text, &$smarty)
                unset($params['acl']);
        }
 
-       echo "<font color='blue' size='2'>&nbsp;".$acl."</font>";
+       if (isset($_SESSION['DEBUGLEVEL']) && $_SESSION['DEBUGLEVEL'] & DEBUG_ACL ){
+               echo "<font color='blue' size='2'>&nbsp;".$acl."</font>";
+       }
 
        /* 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;
 }