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

functions/addressbook.php

index dc6fd83..ae87d67 100644 (file)
@@ -425,13 +425,20 @@ class AddressBook {
     var $add_extra_field = false;
 
     /**
-     * Constructor function.
+     * Constructor (PHP5 style, required in some future version of PHP)
      */
-    function AddressBook() {
+    function __construct() {
         $this->localbackendname = _("Personal Address Book");
     }
 
     /**
+     * Constructor (PHP4 style, kept for compatibility reasons)
+     */
+    function AddressBook() {
+        self::__construct();
+    }
+
+    /**
      * Return an array of backends of a given type,
      * or all backends if no type is specified.
      * @param string $type backend type