summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2014-08-26 01:14:26 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2014-08-26 01:16:18 (GMT)
commit2326618b3afabdc5b3506de9e2d5a7c46e3bb9f4 (patch)
treecb1a2c82a25160827c1863fcd62ec0fc75f3ee11
parentb0bfd9a24f2ec4e0600d98a789badad264bbf215 (diff)
downloadkolab-wap-2326618b3afabdc5b3506de9e2d5a7c46e3bb9f4.tar.gz
Fix so LDAP internal debug is enabled only when debug_mode=trace (#3535)
-rw-r--r--lib/Auth/LDAP.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Auth/LDAP.php b/lib/Auth/LDAP.php
index d4b0fd9..262768c 100644
--- a/lib/Auth/LDAP.php
+++ b/lib/Auth/LDAP.php
@@ -43,7 +43,7 @@ class LDAP extends Net_LDAP3 {
// Causes nesting levels to be too deep...?
//$this->config_set('config_get_hook', array($this, "_config_get"));
- $this->config_set("debug", true);
+ $this->config_set("debug", Log::mode() == Log::TRACE);
$this->config_set("log_hook", array($this, "_log"));
$this->config_set("config_root_dn", "cn=config");
@@ -1172,6 +1172,9 @@ class LDAP extends Net_LDAP3 {
Log::debug($str . $msg);
break;
case LOG_ERR:
+ case LOG_ALERT:
+ case LOG_CRIT:
+ case LOG_EMERG:
Log::error($str . $msg);
break;
case LOG_INFO:
@@ -1180,9 +1183,6 @@ class LDAP extends Net_LDAP3 {
case LOG_WARNING:
Log::warning($str . $msg);
break;
- case LOG_ALERT:
- case LOG_CRIT:
- case LOG_EMERG:
case LOG_NOTICE:
default:
Log::trace($str . $msg);