From: Marcel Werk Date: Fri, 17 May 2013 16:24:29 +0000 (+0200) Subject: Small optimization X-Git-Tag: 2.0.0_Beta_1~167 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=970ae1171dd7594e6616295236d7b19d6a2eba0b;p=GitHub%2FWoltLab%2FWCF.git Small optimization --- 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); }