Commit graph

76671 commits

Author SHA1 Message Date
Bartosz Dziewoński
c94077e0e2 EditPage: Preserve &ooui=1 / &ooui=0 from URL after preview
Bug: T165237
Change-Id: Ia546159b45fabb1256f63f888412703ca3eba2e9
2017-05-15 20:33:37 +02:00
jenkins-bot
6f875daf49 Merge "RCFilters: Rephrase 'unset' to 'remove' in default option menu" 2017-05-15 14:40:36 +00:00
jenkins-bot
1f86e53617 Merge "RCFilters: Always put highlight values in the URL" 2017-05-15 14:33:31 +00:00
jenkins-bot
4e74e8b1c6 Merge "RCFilters: Fix getFilterRepresentation to consider '0' as false" 2017-05-15 12:45:55 +00:00
James D. Forrester
1397b21b84 OutputPage: Remove deprecated addParserOutputNoText, getHeadLinks methods
Change-Id: Idc55e7bb0f7bde8466192a81886f205de60c092c
2017-05-15 13:17:04 +01:00
James D. Forrester
6854fc6182 Removed deprecated ExtractThumbParameters hook
Depends-On: I827c61a5a340d4f107478174263e4a5d385398f4
Change-Id: I97e820d78d8041c40fb6e553c4081c676602462c
2017-05-15 13:17:04 +01:00
Brad Jorsch
ecb4c0e3fe ParserOptions: Include wrapping class in options hash
Avoids polluting the cache when things take advantage of the option.

Bug: T165115
Bug: T165161
Change-Id: I5be25c6de68012df58b6a0cbf92e2f972be2b68a
2017-05-15 05:55:51 +00:00
Translation updater bot
28d3fa1d92 Localisation updates from https://translatewiki.net.
Change-Id: I4b723b8eac7d7df85781495c396db74ea0021dbc
2017-05-14 21:54:43 +02:00
Moriel Schottlender
e37ebca631 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
2017-05-14 02:23:56 +00:00
Moriel Schottlender
ee5397eaa0 RCFilters: Fix getFilterRepresentation to consider '0' as false
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
2017-05-13 13:22:58 -07:00
Translation updater bot
2f5d5d4c37 Localisation updates from https://translatewiki.net.
Change-Id: Ia4e0aad6e4f8ee1f1cba85cf72c77d83bffae7f3
2017-05-13 21:54:02 +02:00
jenkins-bot
a6a7f754b6 Merge "resourceloader: Add filename to validateScriptFile cache key" 2017-05-13 00:36:43 +00:00
jenkins-bot
89444ffd76 Merge "resourceloader: Simplify validateScriptFile() with getWithSetCallback" 2017-05-13 00:32:10 +00:00
Timo Tijhof
3a748592f8 resourceloader: Add filename to validateScriptFile cache key
* 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
2017-05-13 00:24:40 +00:00
jenkins-bot
1cfd93436c Merge "ApiQueryRevisions: Don't be so tricky handling rvstartid/rvendid" 2017-05-12 22:45:23 +00:00
Moriel Schottlender
5235c04493 RCFilters: Rephrase 'unset' to 'remove' in default option menu
Bug: T164861
Change-Id: I13174ac6812532fe0537cbba0f649cf330bf0c57
2017-05-12 15:38:12 -07:00
Translation updater bot
76cc902ce8 Localisation updates from https://translatewiki.net.
Change-Id: I411ee26a2f6dd7199c42bc3a8e70fde852255ca7
2017-05-12 22:23:36 +02:00
Timo Tijhof
702bce40d0 resourceloader: Simplify validateScriptFile() with getWithSetCallback
* Simplify by using early return and getWithSetCallback.
* Add TTL (previously indefinite, now 1 week).

Bug: T52919
Change-Id: Ic95ba392cdb3bcc8081c77d2c2a3240548bed366
2017-05-12 18:13:15 +00:00
Brad Jorsch
9c8e3214f3 ApiQueryRevisions: Don't be so tricky handling rvstartid/rvendid
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
2017-05-12 13:19:52 -04:00
Moriel Schottlender
c1bd4b7d27 Refactor filter-specific logic into group models
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
2017-05-12 15:06:20 +00:00
Roan Kattouw
960e85b443 RCFilters UI: Add a placeholder to SavedLinksListWidget when it's empty
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
2017-05-12 14:29:55 +00:00
Geoffrey Mon
3a7ce3d629 Date range filtering in Special:NewFiles
Bug: T13836
Change-Id: I6149a081db2494a36a715259b76a0c0470149b8c
2017-05-12 13:26:44 +00:00
Roan Kattouw
f3afb5441f RCFilters UI: Add tooltip to saved links items
Bug: T164861
Change-Id: Ic7c38c59c53d4d83b959eff36d4b1d198bb654ea
2017-05-12 13:17:23 +00:00
jenkins-bot
e9ff7eb533 Merge "Pager class for filtering by date range" 2017-05-12 13:16:58 +00:00
jenkins-bot
4a8f414a2d Merge "RCFilters: Treat saved query with multiple spaces as empty" 2017-05-12 13:16:23 +00:00
jenkins-bot
6479f229ac Merge "RCFilters: Actually read/write highlight parameter" 2017-05-12 13:15:48 +00:00
Geoffrey Mon
53fa809a62 Pager class for filtering by date range
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
2017-05-12 14:55:54 +02:00
Toni Hermoso Pulido
53653a06c5 More magic word translations for Catalan (ca)
Newly translated magic words and new translations for
some already-translated magic words, sometimes moving
existing translations to a lower priority.

Change-Id: I18fd3481f880cf84cdb9b9b486e7062c9f6fbdcc
2017-05-12 09:23:07 +02:00
jenkins-bot
c41233e962 Merge "Add X-Content-Dimensions support to DjVu" 2017-05-12 03:18:32 +00:00
jenkins-bot
e41e2d90b3 Merge "Factor out changetag name validation check" 2017-05-12 02:25:43 +00:00
jenkins-bot
9f7ad0b2ec Merge "RCFilters UI: Add down indicator to SavedLinksListWidget button" 2017-05-12 01:07:38 +00:00
jenkins-bot
3c97f1b788 Merge "RCFilters UI: Don't remove removed saved links twice" 2017-05-12 01:07:35 +00:00
Moriel Schottlender
834882dfa0 RCFilters: Treat saved query with multiple spaces as empty
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
2017-05-11 17:52:45 -07:00
Moriel Schottlender
9f35c35524 RCFilters: Actually read/write highlight parameter
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
2017-05-11 17:02:22 -07:00
jenkins-bot
75483c8722 Merge "Gate option to save RC filters to default false" 2017-05-11 21:45:46 +00:00
jenkins-bot
5bd3c1146b Merge "mw.Upload.Dialog: Define .static.name" 2017-05-11 21:38:03 +00:00
jenkins-bot
a7b590064b Merge "Check for null before calling a textResults method to (fixes T165091)" 2017-05-11 21:36:06 +00:00
jenkins-bot
d1f87ef9f7 Merge "Fix comment typo in MimeMagic.php" 2017-05-11 21:29:36 +00:00
jenkins-bot
99da289757 Merge "benchmarks: Convert benchmarkHooks to use Benchmarker" 2017-05-11 21:19:11 +00:00
Matthew Flaschen
5b9f2c8d00 Gate option to save RC filters to default false
Change-Id: I1c9e382c265a097b5eea07b529ec542a60562307
2017-05-11 17:14:14 -04:00
Umherirrender
1c78f4af1c Fix comment typo in MimeMagic.php
Change-Id: I6343e773c9b9988683b2b28cbbde8fc71359376f
2017-05-11 22:18:31 +02:00
Mukunda Modell
9592331197 Check for null before calling a textResults method to (fixes T165091)
Bug: T165091
Change-Id: I6fd23eb5fa04049fd7a44faae76f77fae23f5202
2017-05-11 14:59:12 -05:00
Translation updater bot
1027d0dd21 Localisation updates from https://translatewiki.net.
Change-Id: I6d7f1e58cbbc0adbdd159ab7d37f2f22a8fd73d6
2017-05-11 21:57:23 +02:00
Bartosz Dziewoński
75c3d36ff7 mw.Upload.Dialog: Define .static.name
Bug: T164999
Change-Id: I0e5d11bdeac1ea60caaa146041057e7a9faf351c
2017-05-11 20:11:40 +02:00
jenkins-bot
a4943f548b Merge "Handle proxy-based TLS when placed in front of Swift" 2017-05-11 12:10:35 +00:00
Gilles Dubuc
4511f6fa9f Add X-Content-Dimensions support to DjVu
Bug: T150741
Change-Id: I4a3bae9bf056a7ba332f2f0a330697cdf59b4d04
2017-05-11 13:54:27 +02:00
daniel
e4fc1ffec3 Allow namespaces defined in extension.json to be overwritten locally.
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
2017-05-11 12:16:24 +02:00
David Causse
6ffa1e302e Add 'show-multimedia-search-results' to SearchEngine feature data
Let the search engine controls if multimedia results have to be shown
in the new interwiki sidebar.

Bug: T164925
Change-Id: Ie3ccb28bf73110b136475e9527a2653bf06b8e45
2017-05-11 09:45:04 +02:00
Roan Kattouw
a2a9246b47 RCFilters UI: Add down indicator to SavedLinksListWidget button
Bug: T164861
Change-Id: I23c602e9bcfbbe8f39f3e3efc4a5482490699214
2017-05-11 07:42:12 +00:00
Roan Kattouw
9ef0027faa RCFilters UI: Don't remove removed saved links twice
The second removal also didn't remove the right thing.

Change-Id: Iab32ae2e19e2b19995b88fbfd2e84a36dbda1bac
2017-05-10 18:31:41 -07:00