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

functions/abook_database.php

index 06eda0c64b561329f8a5b2ead7e0ae747a6a0732..68110ee67a9098939f21f717794d859567eba2b4 100644 (file)
@@ -147,10 +147,10 @@ class abook_database extends addressbook_backend {
     /* ========================== Private ======================= */
 
     /**
-     * Constructor
+     * Constructor (PHP5 style, required in some future version of PHP)
      * @param array $param address book backend options
      */
-    function abook_database($param) {
+    function __construct($param) {
         $this->sname = _("Personal Address Book");
 
         /* test if PDO or Pear DB classes are available and freak out if necessary */
@@ -206,6 +206,13 @@ class abook_database extends addressbook_backend {
         }
     }
 
+    /**
+     * Constructor (PHP4 style, kept for compatibility reasons)
+     * @param array $param address book backend options
+     */
+    function abook_database($param) {
+        return self::__construct($param);
+    }
 
     /**
      * Open the database.