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:14:26 (GMT)
commitda397091f63d3bfd0cf33165f9128fee47df9f39 (patch)
treeafb0b4ff4a47d4710685060752bcdc237d30dadb
parent3b76ee09bfcdd436fa3c1211abaf43bcb029d2de (diff)
downloadkolab-wap-da397091f63d3bfd0cf33165f9128fee47df9f39.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 7763205..2dfe084 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");
@@ -1208,6 +1208,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:
@@ -1216,9 +1219,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);