From: pdontthink Date: Sat, 10 Dec 2016 11:31:19 +0000 (+0000) Subject: Add PHP5-style constructor X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=634f552af8d395283b82c4c71da59e4f553cc51a;p=squirrelmail.git Add PHP5-style constructor git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14632 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- 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 *