Review 12.4 Merged

85027[BUGFIX] Fix ext_config_template.txt zero-based category ordering

Christian Kuhn CR +2 V +2 Easy +2 −1 updated 06/30/24, 12:16

Commit message

In the Admin Tools > Settings > Extension Configuration module,
extensions can provide a ext_config_template.txt file.

Comments inside that file dictate where and in which order a
configuration option is listed.

The syntax is:

```
 # cat=SomeCategory//0; type=boolean; label=some config
bar = 0

 # cat=SomeCategory//1; type=boolean; label=other config
baz = 0
```

The parsing routine however could not properly deal with
"0" entries for the input element order because checking
this was using an "falsy" statement instead of allowing
also "0" as a string. In this case, such a zero-based
config element was not displayed.

This is fixed, and an example is added to the EXT:styleguide
extension configuration.

Note that the error would not cause problems when either:

* Another category assignment of another input element
took place before, thus properly initializing
the sort ordering.

* The key did not use "0" as a sorting index, but anything
non-falsy.

* The string "cat=SomeCategory//0" was replaced with
"cat=SomeCategory/0" (thus having an unset sorting key).

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 2

Files 1