Validate sort order in Special:Search
authorErik Bernhardson <ebernhardson@wikimedia.org>
Mon, 22 Jul 2019 19:10:54 +0000 (12:10 -0700)
committerErik Bernhardson <ebernhardson@wikimedia.org>
Tue, 23 Jul 2019 17:18:34 +0000 (10:18 -0700)
commit4d9d61460d9420cc184c22243b0da81855e8f3a1
tree8bfa601971974f176ef79ef4ffb24c5f6d4d0f54
parent629bb43871ba3b8afb12be9c484d93c44898610e
Validate sort order in Special:Search

Providing an invalid sort order to Special:Search could trigger an
exception from the search engine when trying to apply it. Validate the
sort order, much like API classes do, and let the user know that the
sort they requested could not be applied.

We also have a unreported error for invalid profile requested, so
added that warning to the display while here.

Bug: T228171
Change-Id: I79079eea8c03a90b5b65f1dad11c99e514de00e1
includes/specials/SpecialSearch.php
languages/i18n/en.json
languages/i18n/qqq.json
tests/phpunit/includes/specials/SpecialSearchTest.php