summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-09-04 13:50:08 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-09-04 13:50:08 (GMT)
commit8f6dba9093e5c2728ff731e9381f79dfc3596e4a (patch)
treed7210ee506c93515f3eb172ea9d425a4be5e8b5c
parentea087723e5581b942667e916903f24e63bc25cbb (diff)
downloadNet_LDAP3-8f6dba9093e5c2728ff731e9381f79dfc3596e4a.tar.gz
Cache supported controls once obtained
-rw-r--r--lib/Net/LDAP3.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Net/LDAP3.php b/lib/Net/LDAP3.php
index 2ea7833..968eddc 100644
--- a/lib/Net/LDAP3.php
+++ b/lib/Net/LDAP3.php
@@ -1899,11 +1899,16 @@ class Net_LDAP3
private function supported_controls()
{
+ if (!empty($this->supported_controls)) {
+ return $this->supported_controls;
+ }
+
$this->_info("Obtaining supported controls");
$this->return_attributes = Array("supportedcontrol");
$result = $this->search("", "(objectclass=*)", 'base');
$result = $result->entries(TRUE);
$this->_info("Obtained " . count($result['']['supportedcontrol']) . " supported controls");
+ $this->supported_controls = $result['']['supportedcontrol'];
return $result['']['supportedcontrol'];
}