From d789daf08ba0656b4c547d3b22ba97db951ce434 Mon Sep 17 00:00:00 2001 From: pdontthink Date: Fri, 2 May 2008 21:28:59 +0000 Subject: [PATCH] Include original configuration array in Option object; allows custom save handlers to add their own parameters and access them at save time git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13080 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/options.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/functions/options.php b/functions/options.php index 8311d689..1814e303 100644 --- a/functions/options.php +++ b/functions/options.php @@ -60,6 +60,11 @@ define('SMOPT_SAVE_NOOP', 'save_option_noop'); * @subpackage prefs */ class SquirrelOption { + /** + * The original option configuration array + * @var array + */ + var $raw_option_array; /** * The name of this setting * @var string @@ -184,6 +189,7 @@ class SquirrelOption { /** * Constructor function + * @param array $raw_option_array * @param string $name * @param string $caption * @param integer $type @@ -193,8 +199,9 @@ class SquirrelOption { * @param bool $htmlencoded */ function SquirrelOption - ($name, $caption, $type, $refresh_level, $initial_value = '', $possible_values = '', $htmlencoded = false) { + ($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; $this->name = $name; $this->caption = $caption; $this->type = $type; @@ -886,6 +893,7 @@ function create_option_groups($optgrps, $optvals) { foreach ($grpopts as $optset) { /* Create a new option with all values given. */ $next_option = new SquirrelOption( + $optset, $optset['name'], $optset['caption'], $optset['type'], -- 2.25.1