From: Matthias Schmidt Date: Thu, 9 May 2019 15:58:16 +0000 (+0200) Subject: Fix first position option not being shown for show order form fields X-Git-Tag: 5.2.0_Alpha_1~101 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d83437173ec5ca8d72dfea0c05c16725afd09629;p=GitHub%2FWoltLab%2FWCF.git Fix first position option not being shown for show order form fields See #2509 --- diff --git a/wcfsetup/install/files/lib/system/form/builder/field/ShowOrderFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/ShowOrderFormField.class.php index 038ce0be2a..77fe58392b 100644 --- a/wcfsetup/install/files/lib/system/form/builder/field/ShowOrderFormField.class.php +++ b/wcfsetup/install/files/lib/system/form/builder/field/ShowOrderFormField.class.php @@ -67,13 +67,11 @@ class ShowOrderFormField extends SingleSelectionFormField { parent::options($options, $nestedOptions, $labelLanguageItems); $this->options = [0 => WCF::getLanguage()->get('wcf.form.field.showOrder.firstPosition')] + $this->options; - if ($nestedOptions) { - array_unshift($this->nestedOptions, [ - 'depth' => 0, - 'label' => WCF::getLanguage()->get('wcf.form.field.showOrder.firstPosition'), - 'value' => 0 - ]); - } + array_unshift($this->nestedOptions, [ + 'depth' => 0, + 'label' => WCF::getLanguage()->get('wcf.form.field.showOrder.firstPosition'), + 'value' => 0 + ]); return $this; }