Add PHP5-style constructor
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 10 Dec 2016 11:04:56 +0000 (11:04 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 10 Dec 2016 11:04:56 +0000 (11:04 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14627 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/abook_ldap_server.php

index 02c6ad75c1c415a0b3f13ad068f0ccf2adf9b283..8bf7cf742a4456d9a0494c96365f96000ace33f7 100644 (file)
@@ -178,10 +178,11 @@ class abook_ldap_server extends addressbook_backend {
     var $starttls = false;
 
     /**
-     * Constructor. Connects to database
+     * Constructor (PHP5 style, required in some future version of PHP)
+     * Connects to the database
      * @param array connection options
      */
-    function abook_ldap_server($param) {
+    function __construct($param) {
         if(!function_exists('ldap_connect')) {
             $this->set_error(_("PHP install does not have LDAP support."));
             return;
@@ -255,6 +256,14 @@ class abook_ldap_server extends addressbook_backend {
         }
     }
 
+    /**
+     * Constructor (PHP4 style, kept for compatibility reasons)
+     * Connects to the database
+     * @param array connection options
+     */
+    function abook_ldap_server($param) {
+        return self::__construct($param);
+    }
 
     /**
      * Open the LDAP server.