HTMLMultiSelectField: Improve compat with GET forms with no wpFormIdentifier
authorBartosz Dziewoński <matma.rex@gmail.com>
Wed, 18 Jul 2018 18:09:39 +0000 (20:09 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Wed, 18 Jul 2018 18:10:04 +0000 (20:10 +0200)
commit098fd0dcb34cca4a3d11059e0d6a7d4861124d98
tree24d9187d940d938b2b4ab720c6c900f4d0a93d68
parent6205c06ebed0965fe7e097fb795f7600a0d2e93c
HTMLMultiSelectField: Improve compat with GET forms with no wpFormIdentifier

Now it behaves more like HTMLCheckField: if there is clearly a value
submitted, it will load it.

Setting wpFormIdentifier is still needed for forms with default-on
checkboxes (without form identifier, it is impossible to distinguish a
page view without form submission, and form submission with default-on
checkbox unchecked).

In particular, this fixes the 'Show additional logs' checkboxes on
Special:Log: they no longer get unchecked after form submission.

Change-Id: Ief74a7e424b37ccd44759133b3cb8665275314a6
includes/htmlform/fields/HTMLCheckField.php
includes/htmlform/fields/HTMLMultiSelectField.php