From 634f552af8d395283b82c4c71da59e4f553cc51a Mon Sep 17 00:00:00 2001 From: pdontthink Date: Sat, 10 Dec 2016 11:31:19 +0000 Subject: [PATCH] Add PHP5-style constructor git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14632 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/db_prefs.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/functions/db_prefs.php b/functions/db_prefs.php index de256e4c..09ecce8e 100644 --- a/functions/db_prefs.php +++ b/functions/db_prefs.php @@ -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 * -- 2.25.1