#32667 [Opn->Bgs]: ldap_sort() multivalue issue
| From: | sniper@php.net | Date: | Mon, 11 Apr 2005 15:33:32 +0000 |
| Subject: | #32667 [Opn->Bgs]: ldap_sort() multivalue issue | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-76644@lists.php.net to get a copy of this message | ||
ID: 32667
Updated by: sniper@php.net
Reported By: b dot hallinger at ergonaz dot net
-Status: Open
+Status: Bogus
Bug Type: LDAP related
Operating System: Linux Debian (Sarge)
PHP Version: 4.3.10
New Comment:
We only wrap around the ldap_sort_entries() function.
Report this to e.g. openldap authors.
Previous Comments:
------------------------------------------------------------------------
[2005-04-11 11:34:43] b dot hallinger at ergonaz dot net
Description:
------------
Hello,
there is a issue if you want to sort your searchresult by multivalued
attributes.
ldap_sort() works fine, but only if you sort by singlevalued
attributes.
Reproduce code:
---------------
I don't post code here, because its trivial. I will post an example
dataset with two entries:
entry one:
sn=aaaa
id=1111
id=2222
id=3333
entry two:
sn=bbbb
id=6666
id=1000
Expected result:
----------------
If you sort by "id", the second entry should move to the first place,
which he doesnt, because only the first vlaues of "id" got compared.
Actual result:
--------------
entry one remains entry one, although id=6666 is greater than id=1111!
ldap_sort() overlooks, that there is an id which is smaller (id=1000).
I think the solution to this could be to tell ldap_sort() to search for
the biggest value in the multivalue attribute prior comparing with the
other entries.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32667&edit=1