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
Because '0' is a string, it's true, but for our purposes, it's
supposed to be false. Thanks JavaScript.
This bug was actually pretty horrific, it meant that when you refresh
the representation is all wrong (all items in the group were considered
true if the group was 'send_unselected_if_any' which meant that most
of those (that are full coverage) 'corrected themselves' to be all-false
which meant you lost filters when refreshing, even though the parameters
appeared in the URL (the url helpfully corrects itself based on the model
but the model was wrong.)
How did this pass unit tests, one might ask. Well, the unit tests were
treating parameter values as numbers, rather than strings, a fact that
is promptly fixed in this commit.
Also, for consistency and proper data validation, all parameters are
now always stored and handled as strings, in the model.
Bug: T165230
Change-Id: I16d8d95be067b3e48e557ef25f8eb6a49736aa4e
* Add fileName to cache key to fix T52919. The cached parsed error
message contains the filename, this should be part of the cache
key as otherwise two identical user scripts may report the same
error message, including " on line X of page Y" where Y is whichever
of the two pages first created the cache entry.
* Make the cache key global instead of per-wiki. There is no need
for this to be per-wiki.
Bug: T52919
Change-Id: I6c2718c53be7f6384a6486a4a8718ae7f423d216
* Simplify by using early return and getWithSetCallback.
* Add TTL (previously indefinite, now 1 week).
Bug: T52919
Change-Id: Ic95ba392cdb3bcc8081c77d2c2a3240548bed366
If someone strangely supplies 0 as an id, the tricky version confuses
that with null and winds up making the DB layer throw an exception. Just
do it more straightforwardly.
Bug: T165100
Change-Id: Id8376d419e7758c0bf92ad50dd7b7ac283a73101
Make the view model more generic and ready to accept other types
of filtering, like namespaces and tags, by handing off the responsibility
and logic of the parameterizing and filter relationships to the groups.
Change-Id: I9c333719e89088d96d044d72ddb9c39feeeb68ca
No longer hide the button when the menu is empty, but instead
show the placeholder item when the *model* is empty.
Bug: T164861
Change-Id: I96e5e375de5f35946663042f6731d7b69e53308b
New abstract class RangeChronologicalPager to provide shared date range
filtering capability (with unit tests)
I18n msgs to use as common labels for date range inputs
Expose some ReverseChronologicalParser::getDateCond logic so we can
convert year/month date filters to datestamp date filters
Bug: T120733
Change-Id: I65fdc00368f406f5fa2492600e95e07ce442c165
Newly translated magic words and new translations for
some already-translated magic words, sometimes moving
existing translations to a lower priority.
Change-Id: I18fd3481f880cf84cdb9b9b486e7062c9f6fbdcc
Because it is empty, even if there's multiple spaces. Also, if the
input is invalid and we didn't save the query, don't close the
popup.
Bug: T165113
Change-Id: I30e68b0b90e2a4077fb4068c1462d40b03cbfe8c
The highlight parameter enables/disables the highlight view. It was
not properly updated to the URL, and a separate typo made it not update
the model correctly.
Bug: T165107
Change-Id: Ie711d4d08fb3eeffca50c2953016e02e2620f898
This allows extension namespaces to be assigned a custom ID, e.g. in case
the namespace pre-defined by the extension is already taken on the local
wiki.
This is done by defining the respective namespace constant in
LocalSettings.php.
Bug: T160462
Change-Id: If648d6e218847e6632d643ea724cd3da3945db70
Let the search engine controls if multimedia results have to be shown
in the new interwiki sidebar.
Bug: T164925
Change-Id: Ie3ccb28bf73110b136475e9527a2653bf06b8e45