Add PHP5-style constructor
[squirrelmail.git] / functions / db_prefs.php
index de256e4c413f22df629554dd3abe739d2e14fd7a..09ecce8ed07346425616369d1f1c9ee40f1ae3c4 100644 (file)
@@ -208,10 +208,11 @@ class dbPrefs {
 
 
     /**
+     * Constructor (PHP5 style, required in some future version of PHP)
      * initialize the default preferences array.
      *
      */
-    function dbPrefs() {
+    function __construct() {
         // Try and read the default preferences file.
         $default_pref = SM_PATH . 'config/default_pref';
         if (@file_exists($default_pref)) {
@@ -228,6 +229,15 @@ class dbPrefs {
         }
     }
 
+    /**
+     * Constructor (PHP4 style, kept for compatibility reasons)
+     * initialize the default preferences array.
+     *
+     */
+    function dbPrefs() {
+       self::__construct();
+    }
+
     /**
      * initialize DB connection object
      *