From b4d528823ec03ff0482dd244a4186e06a0bdd001 Mon Sep 17 00:00:00 2001 From: pdontthink Date: Sat, 10 Dec 2016 11:43:49 +0000 Subject: [PATCH] Add PHP5-style constructor git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14635 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/options.php | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/functions/options.php b/functions/options.php index 07ee7837..c9332849 100644 --- a/functions/options.php +++ b/functions/options.php @@ -182,7 +182,7 @@ class SquirrelOption { var $folder_filter='noselect'; /** - * Constructor function + * Constructor (PHP5 style, required in some future version of PHP) * @param array $raw_option_array * @param string $name * @param string $caption @@ -192,7 +192,7 @@ class SquirrelOption { * @param array $possible_values * @param bool $htmlencoded */ - function SquirrelOption + function __construct ($raw_option_array, $name, $caption, $type, $refresh_level, $initial_value = '', $possible_values = '', $htmlencoded = false) { /* Set the basic stuff. */ $this->raw_option_array = $raw_option_array; @@ -239,6 +239,22 @@ class SquirrelOption { } } + /** + * Constructor (PHP4 style, kept for compatibility reasons) + * @param array $raw_option_array + * @param string $name + * @param string $caption + * @param integer $type + * @param integer $refresh_level + * @param mixed $initial_value + * @param array $possible_values + * @param bool $htmlencoded + */ + function SquirrelOption + ($raw_option_array, $name, $caption, $type, $refresh_level, $initial_value = '', $possible_values = '', $htmlencoded = false) { + self::__construct($raw_option_array, $name, $caption, $type, $refresh_level, $initial_value, $possible_values, $htmlencoded); + } + /** Convenience function that identifies which types of widgets are stored as (serialized) array values. */ function is_multiple_valued() { -- 2.25.1