From 2238778dd6be3d8283cab28e571d09a983c2121b Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Wed, 19 Aug 2015 13:58:33 +0000 Subject: [PATCH] authzgroups : the allow rights are tested and displayed only in debug mode git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2258 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- authzgroups.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/authzgroups.php b/authzgroups.php index 3a2c574..68a535c 100644 --- a/authzgroups.php +++ b/authzgroups.php @@ -139,7 +139,8 @@ class authzgroups 500); if ($object === "/") $object = ""; $rc = $this->allow ($module, $user, "/$object"); - trigger_error ("authzgroups : accessRight ('$module','$user','/$object')". + if ($this->debug) + trigger_error ("authzgroups : accessRight ('$module','$user','/$object')". "=$rc", E_USER_NOTICE); if ($rc !== "NO") return TRUE; @@ -167,7 +168,8 @@ class authzgroups 500); if ($object === "/") $object = ""; $rc = $this->allow ($module, $user, "/$object"); - trigger_error ("authzgroups : accessWrite ('$module','$user','/$object')". + if ($this->debug) + trigger_error ("authzgroups : accessWrite ('$module','$user','/$object')". "=$rc", E_USER_NOTICE); if ($rc === "RW") return TRUE; @@ -196,8 +198,9 @@ class authzgroups 500); if ($object === "/") $object = ""; $rc = $this->allow ($module, $user, "/$object"); - trigger_error ("authzgroups : accessReadOnly ('$module','$user','/$object')" - ."=$rc", E_USER_NOTICE); + if ($this->debug) + trigger_error ("authzgroups : accessReadOnly ('$module','$user',". + "'/$object')" ."=$rc", E_USER_NOTICE); if ($rc === "RO") return TRUE; if ($user === "anonymous")