From 9e40fddb8a0bc6b30d9e5e66b821e19b434dd623 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come@opensides.be>
Date: Tue, 28 Mar 2017 16:58:55 +0200
Subject: [PATCH] Improved a bit information given by ACL debug mode

---
 contrib/smarty/plugins/block.render.php  | 2 +-
 include/simpleplugin/class_Attribute.inc | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/smarty/plugins/block.render.php b/contrib/smarty/plugins/block.render.php
index 752058800..b8308571f 100644
--- a/contrib/smarty/plugins/block.render.php
+++ b/contrib/smarty/plugins/block.render.php
@@ -34,7 +34,7 @@ function smarty_block_render($params, $text, &$smarty)
 
   /* Debug output */
   if (session::is_set('DEBUGLEVEL') && session::get('DEBUGLEVEL') & DEBUG_ACL ) {
-    echo '<div style="color:blue;">'.$acl.'</div>';
+    echo '<div style="color:blue;">'.$acl.(isset($params['aclName']) ? ' ['.$params['aclName'].']' : '').'</div>';
   }
 
   /* Read / Write*/
diff --git a/include/simpleplugin/class_Attribute.inc b/include/simpleplugin/class_Attribute.inc
index 673c1faa6..5e6328658 100644
--- a/include/simpleplugin/class_Attribute.inc
+++ b/include/simpleplugin/class_Attribute.inc
@@ -613,7 +613,7 @@ class Attribute
    */
   function renderAcl($display)
   {
-    return '{render acl=$'.$this->getAcl()."ACL}\n$display\n{/render}";
+    return '{render aclName="'.$this->getAcl().'" acl=$'.$this->getAcl()."ACL}\n$display\n{/render}";
   }
 
   /*! \brief Get ACL information about the ACL we need to create
-- 
GitLab