From f76cc27ceb56787b624c746abfb2900d73394326 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 16 Nov 2011 17:46:00 +0100 Subject: [PATCH] Moved option handling into external class. Options were handled within the Form-derived classes itself, causing non-accessible code if calling from outside (e.g. using an AJAX-request). --- .../acp/form/AbstractOptionListForm.class.php | 353 +------------- .../files/lib/acp/form/OptionForm.class.php | 36 +- .../files/lib/data/option/Option.class.php | 9 + .../system/option/IOptionHandler.class.php | 70 +++ .../lib/system/option/OptionHandler.class.php | 432 ++++++++++++++++++ 5 files changed, 539 insertions(+), 361 deletions(-) create mode 100644 wcfsetup/install/files/lib/system/option/IOptionHandler.class.php create mode 100644 wcfsetup/install/files/lib/system/option/OptionHandler.class.php diff --git a/wcfsetup/install/files/lib/acp/form/AbstractOptionListForm.class.php b/wcfsetup/install/files/lib/acp/form/AbstractOptionListForm.class.php index 679953a46f..84fed98c79 100755 --- a/wcfsetup/install/files/lib/acp/form/AbstractOptionListForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/AbstractOptionListForm.class.php @@ -1,14 +1,8 @@ - */ - public $cachedCategories = array(); - - /** - * list of all options - * @var array - */ - public $cachedOptions = array(); - - /** - * category structure - * @var array - */ - public $cachedCategoryStructure = array(); - - /** - * option structure - * @var array - */ - public $cachedOptionToCategories = array(); - - /** - * raw option values - * @var array - */ - public $rawValues = array(); - - /** - * option values - * @var array - */ - public $optionValues = array(); /** * Name of the active option category. @@ -86,62 +44,39 @@ abstract class AbstractOptionListForm extends AbstractForm { public $categoryName = ''; /** - * Options of the active category. - * @var array