RCFilters: Always put highlight values in the URL
authorMoriel Schottlender <moriel@gmail.com>
Sat, 13 May 2017 18:21:14 +0000 (11:21 -0700)
committerMooeypoo <moriel@gmail.com>
Sun, 14 May 2017 02:23:56 +0000 (02:23 +0000)
commite37ebca63103edc85b3105bc14bc031e19261cf1
treeba630f3e076633377abc05e825c7923c769b71f9
parentee5397eaa025908ac9dfaa3d4688f027c09c8a7d
RCFilters: Always put highlight values in the URL

Up until now, we only populated highlights in the URL if the item had
a highlight, otherwise it was not in the url at all. However, now that
the system can load defaults from saved queries that can have highlights
themselves, then every time we reload the page (and the system checks
to get defaults merged with the URL query) nothing actively overrides
the default highlight value if it exists.

This meant that if you have a saved query default with any highlights
in it, every time you load the page from the URL it will **also add**
the default highlights that you have saved.

To prevent this, the URL now needs to always populate items with
highlight value, even if that value is null. When we literally ask
for defaults or when we actively load a saved query, that value will
be overridden, but if we have a URL with highlights enabled at all,
the defaults will not override and add a redundany unneeded highlight
just because it existed in your saved query.

Bug: T165231
Change-Id: Ia43b5c777c0b4e238e99818696a3a60dda0daca9
resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js