From d83437173ec5ca8d72dfea0c05c16725afd09629 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Thu, 9 May 2019 17:58:16 +0200 Subject: [PATCH] Fix first position option not being shown for show order form fields See #2509 --- .../form/builder/field/ShowOrderFormField.class.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) 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; } -- 2.20.1