Happy New Year
[squirrelmail.git] / functions / addressbook.php
index 5c5dbcb2bbf80aa221577e1e6eb115c2468a4b46..64659b77e187abff2bc419259161928e9c842a8a 100644 (file)
@@ -4,7 +4,7 @@
  *
  * Functions require SM_PATH and support of forms.php functions
  *
- * @copyright 1999-2012 The SquirrelMail Project Team
+ * @copyright 1999-2020 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
@@ -425,12 +425,19 @@ 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.
@@ -514,7 +521,7 @@ class AddressBook {
      * @param array $row address book entry
      * @return string email address with real name prepended
      */
-    function full_address($row) {
+    static function full_address($row) {
         global $data_dir, $username, $addrsrch_fullname;
 
         // allow multiple addresses in one row (poor person's grouping - bah)