One of these days I'll get a commit right the first time :)
[squirrelmail.git] / functions / abook_ldap_server.php
index 93097956fe01906bddbd0d110d0a488303c91829..191431482bc61643a2fa61e1133bc0a2872d8f25 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * abook_ldap_server.php
  *
- * Copyright (c) 1999-2002 The Squirrelmail Project Team
+ * Copyright (c) 1999-2003 The SquirrelMail Project Team
  * Licensed under the GNU GPL. For full terms see the file COPYING.
  *
  * Address book backend for LDAP server
@@ -128,7 +128,7 @@ class abook_ldap_server extends addressbook_backend {
         if($this->charset == 'utf-8') {
             if(function_exists('utf8_decode')) {
                 return utf8_decode($str);
-            } else
+            } else {
                 return $str;
             }
         } else {
@@ -157,18 +157,10 @@ class abook_ldap_server extends addressbook_backend {
             return false;
         }
   
-        /* Do the search. Use improved ldap_search() if PHP version is
-         * 4.0.2 or newer. */
-        if(sqCheckPHPVersion(4, 0, 2)) {
-            $sret = @ldap_search($this->linkid, $this->basedn, $expression,
-                array('dn', 'o', 'ou', 'sn', 'givenname', 
-                'cn', 'mail', 'telephonenumber'),
-                0, $this->maxrows, $this->timeout);
-        } else {
-            $sret = @ldap_search($this->linkid, $this->basedn, $expression,
-                array('dn', 'o', 'ou', 'sn', 'givenname', 
-                'cn', 'mail', 'telephonenumber'));
-        }
+        $sret = @ldap_search($this->linkid, $this->basedn, $expression,
+            array('dn', 'o', 'ou', 'sn', 'givenname', 
+            'cn', 'mail', 'telephonenumber'),
+            0, $this->maxrows, $this->timeout);
   
         /* Should get error from server using the ldap_error() function,
          * but it only exist in the PHP LDAP documentation. */
@@ -264,4 +256,4 @@ class abook_ldap_server extends addressbook_backend {
      *
      * Careful with this -- it could get quite large for big sites. */
 }
-?>
\ No newline at end of file
+?>