lib/ext

Aleksander Machniak machniak at kolabsys.com
Tue Jul 30 12:37:47 CEST 2013


 lib/ext/Net/LDAP3.php |   14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

New commits:
commit e9bbaf4d12dbbf165428cb37990563c9cb147c95
Author: Aleksander Machniak <alec at alec.pl>
Date:   Tue Jul 30 12:36:35 2013 +0200

    Fix search operators handling

diff --git a/lib/ext/Net/LDAP3.php b/lib/ext/Net/LDAP3.php
index 64d7db4..6451d09 100644
--- a/lib/ext/Net/LDAP3.php
+++ b/lib/ext/Net/LDAP3.php
@@ -1598,7 +1598,7 @@ class Net_LDAP3
             return null;
         }
 
-        $operators = array('=', '>', '<', '>=', '<=');
+        $operators = array('=', '~=', '>=', '<=');
         $filter    = '';
 
         foreach ((array) $search['params'] as $field => $param) {
@@ -1607,19 +1607,27 @@ class Net_LDAP3
                     $prefix = '';
                     $suffix = '*';
                     break;
+
                 case 'suffix':
                     $prefix = '*';
                     $suffix = '';
                     break;
+
                 case 'exact':
                 case '=':
-                case '>':
-                case '<':
+                case '~=':
                 case '>=':
                 case '<=':
                     $prefix = '';
                     $suffix = '';
                     break;
+
+                case 'exists':
+                    $prefix = '*';
+                    $suffix = '';
+                    $param['value'] = '';
+                    break;
+
                 case 'both':
                 default:
                     $prefix = '*';




More information about the commits mailing list