Index: trunk/extensions/LdapAuthentication/LdapAuthentication.php |
— | — | @@ -209,27 +209,7 @@ |
210 | 210 | */ |
211 | 211 | public static function ldap_search( $ldapconn, $basedn, $filter, $attributes=null, $attrsonly=null, $sizelimit=null, $timelimit=null, $deref=null ) { |
212 | 212 | wfSuppressWarnings(); |
213 | | - if ( $attributes ) { |
214 | | - if ( $attrsonly ) { |
215 | | - if ( $sizelimit ) { |
216 | | - if ( $timelimit ) { |
217 | | - if ( $deref ) { |
218 | | - $ret = ldap_search( $ldapconn, $basedn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit, $deref ); |
219 | | - } else { |
220 | | - $ret = ldap_search( $ldapconn, $basedn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit ); |
221 | | - } |
222 | | - } else { |
223 | | - $ret = ldap_search( $ldapconn, $basedn, $filter, $attributes, $attrsonly, $sizelimit ); |
224 | | - } |
225 | | - } else { |
226 | | - $ret = ldap_search( $ldapconn, $basedn, $filter, $attributes, $attrsonly ); |
227 | | - } |
228 | | - } else { |
229 | | - $ret = ldap_search( $ldapconn, $basedn, $filter, $attributes ); |
230 | | - } |
231 | | - } else { |
232 | | - $ret = ldap_search( $ldapconn, $basedn, $filter ); |
233 | | - } |
| 213 | + $ret = ldap_search( $ldapconn, $basedn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit, $deref ); |
234 | 214 | wfRestoreWarnings(); |
235 | 215 | return $ret; |
236 | 216 | } |
— | — | @@ -239,27 +219,7 @@ |
240 | 220 | */ |
241 | 221 | public static function ldap_read( $ldapconn, $basedn, $filter, $attributes=null, $attrsonly=null, $sizelimit=null, $timelimit=null, $deref=null ) { |
242 | 222 | wfSuppressWarnings(); |
243 | | - if ( $attributes ) { |
244 | | - if ( $attrsonly ) { |
245 | | - if ( $sizelimit ) { |
246 | | - if ( $timelimit ) { |
247 | | - if ( $deref ) { |
248 | | - $ret = ldap_read( $ldapconn, $basedn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit, $deref ); |
249 | | - } else { |
250 | | - $ret = ldap_read( $ldapconn, $basedn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit ); |
251 | | - } |
252 | | - } else { |
253 | | - $ret = ldap_read( $ldapconn, $basedn, $filter, $attributes, $attrsonly, $sizelimit ); |
254 | | - } |
255 | | - } else { |
256 | | - $ret = ldap_read( $ldapconn, $basedn, $filter, $attributes, $attrsonly ); |
257 | | - } |
258 | | - } else { |
259 | | - $ret = ldap_read( $ldapconn, $basedn, $filter, $attributes ); |
260 | | - } |
261 | | - } else { |
262 | | - $ret = ldap_read( $ldapconn, $basedn, $filter ); |
263 | | - } |
| 223 | + $ret = ldap_read( $ldapconn, $basedn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit, $deref ); |
264 | 224 | wfRestoreWarnings(); |
265 | 225 | return $ret; |
266 | 226 | } |
— | — | @@ -269,27 +229,7 @@ |
270 | 230 | */ |
271 | 231 | public static function ldap_list( $ldapconn, $basedn, $filter, $attributes=null, $attrsonly=null, $sizelimit=null, $timelimit=null, $deref=null ) { |
272 | 232 | wfSuppressWarnings(); |
273 | | - if ( $attributes ) { |
274 | | - if ( $attrsonly ) { |
275 | | - if ( $sizelimit ) { |
276 | | - if ( $timelimit ) { |
277 | | - if ( $deref ) { |
278 | | - $ret = ldap_list( $ldapconn, $basedn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit, $deref ); |
279 | | - } else { |
280 | | - $ret = ldap_list( $ldapconn, $basedn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit ); |
281 | | - } |
282 | | - } else { |
283 | | - $ret = ldap_list( $ldapconn, $basedn, $filter, $attributes, $attrsonly, $sizelimit ); |
284 | | - } |
285 | | - } else { |
286 | | - $ret = ldap_list( $ldapconn, $basedn, $filter, $attributes, $attrsonly ); |
287 | | - } |
288 | | - } else { |
289 | | - $ret = ldap_list( $ldapconn, $basedn, $filter, $attributes ); |
290 | | - } |
291 | | - } else { |
292 | | - $ret = ldap_list( $ldapconn, $basedn, $filter ); |
293 | | - } |
| 233 | + $ret = ldap_list( $ldapconn, $basedn, $filter, $attributes, $attrsonly, $sizelimit, $timelimit, $deref ); |
294 | 234 | wfRestoreWarnings(); |
295 | 235 | return $ret; |
296 | 236 | } |