SpecialNewPages: Fix omitted Show/Hide redirect value
authorFlorian Schmidt <florian.schmidt.stargatewissen@gmail.com>
Thu, 2 Mar 2017 17:34:03 +0000 (18:34 +0100)
committerFlorianschmidtwelzow <florian.schmidt.stargatewissen@gmail.com>
Mon, 14 Aug 2017 17:35:01 +0000 (17:35 +0000)
commitd84720dedeb6129ab05f7d84e82d9e3001a72e55
tree28b34870bd36654c55fa6ee2877ad0ca3e16801b
parent6c9a2923fe1ee3a65cb027be5e781772f2b12fbd
SpecialNewPages: Fix omitted Show/Hide redirect value

The URL parameters will internally parsed to true/false by FormOptions for
the SpecialNewPages class. However, FormOptions::getChangedValues() will also
return an array with values of type boolean. wfArrayToCgi() on the other hand,
according to the doc, does not output null and false values if an array is
passed to it (which is done through the LinkRenderer/Title).

This can be fixed by translating the values from a boolean true false to a true
false parsed as URL values (1 and 0). I did this in the SpecialNewPages itself,
as I'm pretty sure, that this does not belong to the FormOptions::getChangedValues()
function and not to the wfArrayToCgi() function (which would change a very basic
and documented functioning from a widely used method).

Bug: T158504
Change-Id: I6660373b002bdb3a03edaf3b64557ffac8f25c6c
includes/specials/SpecialNewpages.php