From f7851934ab8601e4f4e75a6486f6ef7db78ca18c Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Tue, 22 Nov 2011 08:42:07 +0100 Subject: [PATCH] Fixes bug in AbstractOptionListForm Adds missing $loadActiveOptions property which is needed and already used by UserEditForm to ensure that the active options are loaded after the active user has been set. --- .../acp/form/AbstractOptionListForm.class.php | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/wcfsetup/install/files/lib/acp/form/AbstractOptionListForm.class.php b/wcfsetup/install/files/lib/acp/form/AbstractOptionListForm.class.php index c15b5eafa6..f4d36d38ba 100755 --- a/wcfsetup/install/files/lib/acp/form/AbstractOptionListForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/AbstractOptionListForm.class.php @@ -16,18 +16,18 @@ use wcf\system\option\OptionHandler; */ abstract class AbstractOptionListForm extends AbstractForm { /** - * @see wcf\form\AbstractForm::$errorField + * @see wcf\form\AbstractForm::$errorField */ public $errorField = array(); /** - * @see wcf\form\AbstractForm::$errorType + * @see wcf\form\AbstractForm::$errorType */ public $errorType = array(); /** * cache name - * @var string + * @var string */ public $cacheName = 'option'; @@ -38,8 +38,8 @@ abstract class AbstractOptionListForm extends AbstractForm { public $cacheClass = 'wcf\system\cache\builder\OptionCacheBuilder'; /** - * Name of the active option category. - * @var string + * name of the active option category + * @var string */ public $categoryName = ''; @@ -49,6 +49,12 @@ abstract class AbstractOptionListForm extends AbstractForm { */ protected $languageItemPattern = ''; + /** + * true if active options are loaded when option handler is initialized + * @var boolean + */ + public $loadActiveOptions = true; + /** * option handler object * @var wcf\system\option\IOptionHandler @@ -68,16 +74,16 @@ abstract class AbstractOptionListForm extends AbstractForm { public $supportI18n = true; /** - * @see wcf\page\Page::readParameters() + * @see wcf\page\IPage::readParameters() */ public function readParameters() { parent::readParameters(); - $this->optionHandler = new $this->optionHandlerClassName($this->cacheName, $this->cacheClass, $this->supportI18n, $this->languageItemPattern, $this->categoryName); + $this->optionHandler = new $this->optionHandlerClassName($this->cacheName, $this->cacheClass, $this->supportI18n, $this->languageItemPattern, $this->categoryName, $this->loadActiveOptions); } /** - * @see wcf\form\IForm::readFormParameters() + * @see wcf\form\IForm::readFormParameters() */ public function readFormParameters() { parent::readFormParameters(); @@ -86,7 +92,7 @@ abstract class AbstractOptionListForm extends AbstractForm { } /** - * @see wcf\form\IForm::validate() + * @see wcf\form\IForm::validate() */ public function validate() { parent::validate(); @@ -98,6 +104,9 @@ abstract class AbstractOptionListForm extends AbstractForm { } } + /** + * @see wcf\page\IPage::readData() + */ public function readData() { parent::readData(); -- 2.20.1