Fix first position option not being shown for show order form fields
authorMatthias Schmidt <gravatronics@live.com>
Thu, 9 May 2019 15:58:16 +0000 (17:58 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Thu, 9 May 2019 15:58:16 +0000 (17:58 +0200)
See #2509

wcfsetup/install/files/lib/system/form/builder/field/ShowOrderFormField.class.php

index 038ce0be2af0bb364dff1c6d9de53689571292e0..77fe58392b69de0721fc1dc6eafab2926dda2971 100644 (file)
@@ -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;
        }