diff options
author | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2014-08-01 21:27:12 +0200 |
---|---|---|
committer | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2014-08-02 16:46:29 +0200 |
commit | 05ea61095f406dfdd04afd801b68399008e25bef (patch) | |
tree | c75812b43ac857d46541853169021e78da3fae1a | |
parent | 6ac9395fbd8fed837d4f40501e4e6cd089243b96 (diff) |
Fix missing out on the correct sorting
-rw-r--r-- | program/lib/Net/LDAP3.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/program/lib/Net/LDAP3.php b/program/lib/Net/LDAP3.php index b101b4afc..1b3ac73bb 100644 --- a/program/lib/Net/LDAP3.php +++ b/program/lib/Net/LDAP3.php @@ -1847,12 +1847,15 @@ class Net_LDAP3 // Not passing any sort attributes means you don't care if (!empty($sort_attrs)) { $sort_attrs = (array) $sort_attrs; - if (count(array_intersect($sort_attrs, $vlv_index[$base_dn]['sort'])) == count($sort_attrs)) { - return $sort_attrs; - } - else { - return false; + foreach ($vlv_index[$base_dn]['sort'] as $sss_config) { + if (count(array_intersect($sort_attrs, $sss_config)) == count($sort_attrs)) { + return $sort_attrs; + } } + + $this->_error("The requested sorting does not match any server-side sorting configuration"); + + return false; } else { return $vlv_index[$base_dn]['sort'][0]; |