From 970ae1171dd7594e6616295236d7b19d6a2eba0b Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Fri, 17 May 2013 18:24:29 +0200 Subject: [PATCH] Small optimization --- .../AbstractNamedFormElement.class.php | 24 +++++++++++++++++++ .../MultipleSelectionFormElement.class.php | 1 + .../PackageInstallationDispatcher.class.php | 1 + 3 files changed, 26 insertions(+) diff --git a/wcfsetup/install/files/lib/system/form/element/AbstractNamedFormElement.class.php b/wcfsetup/install/files/lib/system/form/element/AbstractNamedFormElement.class.php index 61e0c39e61..007c0f776b 100644 --- a/wcfsetup/install/files/lib/system/form/element/AbstractNamedFormElement.class.php +++ b/wcfsetup/install/files/lib/system/form/element/AbstractNamedFormElement.class.php @@ -13,6 +13,12 @@ use wcf\util\StringUtil; * @category Community Framework */ abstract class AbstractNamedFormElement extends AbstractFormElement { + /** + * element description + * @var string + */ + protected $description = ''; + /** * element name * @var string @@ -25,6 +31,24 @@ abstract class AbstractNamedFormElement extends AbstractFormElement { */ protected $value = ''; + /** + * Sets element description. + * + * @param string $description + */ + public function setDescription($description) { + $this->description = $description; + } + + /** + * Returns element description. + * + * @return string + */ + public function getDescription() { + return $this->description; + } + /** * Sets element name. * diff --git a/wcfsetup/install/files/lib/system/form/element/MultipleSelectionFormElement.class.php b/wcfsetup/install/files/lib/system/form/element/MultipleSelectionFormElement.class.php index 8e7663d47e..8c2b0b7e1a 100644 --- a/wcfsetup/install/files/lib/system/form/element/MultipleSelectionFormElement.class.php +++ b/wcfsetup/install/files/lib/system/form/element/MultipleSelectionFormElement.class.php @@ -30,6 +30,7 @@ class MultipleSelectionFormElement extends AbstractNamedFormElement { public function getHTML($formName) { return << {$this->getLabel()} +{$this->getDesciption()} HTML; } } diff --git a/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php b/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php index cbe7973011..261cf9c3d7 100644 --- a/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php @@ -655,6 +655,7 @@ class PackageInstallationDispatcher { $optionalPackage->setName('optionalPackages'); $optionalPackage->setLabel($package['packageName']); $optionalPackage->setValue($package['package']); + $optionalPackage->setDescription($package['packageDescription']); $container->appendChild($optionalPackage); } -- 2.20.1