Re: ldap_search sort extension, patch included
| From: | Stig Venaas | Date: | Sat, 17 Nov 2001 09:14:32 +0000 |
| Subject: | Re: ldap_search sort extension, patch included | ||
| References: | 1 | Groups: | php.dev php.general |
| Request: | Send a blank email to php-dev+get-70710@lists.php.net to get a copy of this message | ||
On Sat, Nov 17, 2001 at 04:31:26AM +0100, Andre Oppermann wrote:
> Hello all,
>
> This patch enhances PHP4's ldap_search with a call to
> ldap_sort_entries().
In what LDAP APIs are ldap_sort_entries defined? What lib/API are you
using? I wonder how well this works, sorting all kinds of Unicode is
more or less impossible, but if some APIs have this function...
I was also thinking of adding support for server side sorting. I'm
thinking of a different PHP API, so that we don't need to add even
more parameters to ldap_search(). Adding parameters to ldap_search()
that only are valid with some APIs is bad I think. What I have in
mind is something like:
ldap_sort($ld, $sortfilter);
ldap_search($ld,...); (as usual)
where the filter is used for all following searches, until a new filter
is defined. Empty filter could turn it off.
Do people think that this is better? I'm about to commit a patch that
replaces the current link pointer, with a structure that might contain
other state PHP needs per link. The link pointer will then be just a
part of the struct. This is needed for set_rebind_proc() which I'm
working on right now. This won't be visible in PHP land, except that
it makes it easy to have an API like what I suggest for ldap_sort().
Before deciding on ldap_sort() I would like to know a bit about what
APIs support it though.
Stig