summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2014-12-10 15:55:38 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2014-12-10 15:55:38 (GMT)
commit9ed0dd4f053c228cf551df9012ade6d4e8e808db (patch)
tree18e9f5a7d3760bf47dfd8d60376c0925f6dc1db1
parent358dbe256020ed05699cbf5e9fae4fc5683ba32f (diff)
downloadNet_LDAP3-9ed0dd4f053c228cf551df9012ade6d4e8e808db.tar.gz
Set search result count/offset/vlv parameters conditionally
-rw-r--r--lib/Net/LDAP3.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/Net/LDAP3.php b/lib/Net/LDAP3.php
index 5eeb15a..c63e02e 100644
--- a/lib/Net/LDAP3.php
+++ b/lib/Net/LDAP3.php
@@ -1630,9 +1630,15 @@ class Net_LDAP3
}
$result = new Net_LDAP3_Result($this->conn, $base_dn, $filter, $scope, $ldap_result);
- $result->set('offset', $last_offset);
- $result->set('count', $vlv_count);
- $result->set('vlv', true);
+
+ if (isset($last_offset)) {
+ $result->set('offset', $last_offset);
+ }
+ if (isset($vlv_count)) {
+ $result->set('count', $vlv_count);
+ }
+
+ $result->set('vlv', $this->vlv_active);
return $count_only ? $result->count() : $result;
}