From f8cacb7dd01b173cd07219e32cc1dae05ba5a3f4 Mon Sep 17 00:00:00 2001 From: Deon George Date: Sat, 21 Nov 2009 10:36:23 +1100 Subject: [PATCH] Change default size_limit to 0, enabled setting of time_limit (default 0) --- lib/ds_ldap.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/ds_ldap.php b/lib/ds_ldap.php index 81a749c..dd161f2 100644 --- a/lib/ds_ldap.php +++ b/lib/ds_ldap.php @@ -312,8 +312,6 @@ class ldap extends DS { if (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS')) debug_log('Entered (%%)',17,0,__FILE__,__LINE__,__METHOD__,$fargs); - $size_limit = 500; - $time_limit = 0; $attrs_only = 0; # Defaults @@ -335,7 +333,9 @@ class ldap extends DS { if (! isset($query['scope'])) $query['scope'] = 'sub'; if (! isset($query['size_limit'])) - $query['size_limit'] = $size_limit; + $query['size_limit'] = 0; + if (! isset($query['time_limit'])) + $query['time_limit'] = 0; if ($query['scope'] == 'base' && ! isset($query['baseok'])) system_message(array( @@ -362,16 +362,16 @@ class ldap extends DS { switch ($query['scope']) { case 'base': - $search = @ldap_read($resource,$query['base'],$query['filter'],$query['attrs'],$attrs_only,$query['size_limit'],$time_limit,$query['deref']); + $search = @ldap_read($resource,$query['base'],$query['filter'],$query['attrs'],$attrs_only,$query['size_limit'],$query['time_limit'],$query['deref']); break; case 'one': - $search = @ldap_list($resource,$query['base'],$query['filter'],$query['attrs'],$attrs_only,$query['size_limit'],$time_limit,$query['deref']); + $search = @ldap_list($resource,$query['base'],$query['filter'],$query['attrs'],$attrs_only,$query['size_limit'],$query['time_limit'],$query['deref']); break; case 'sub': default: - $search = @ldap_search($resource,$query['base'],$query['filter'],$query['attrs'],$attrs_only,$query['size_limit'],$time_limit,$query['deref']); + $search = @ldap_search($resource,$query['base'],$query['filter'],$query['attrs'],$attrs_only,$query['size_limit'],$query['time_limit'],$query['deref']); break; }