lhc/web/wiklou.git
6 years agoMove some more classes to comply with class per file
Reedy [Sun, 21 May 2017 12:23:31 +0000 (13:23 +0100)]
Move some more classes to comply with class per file

Change-Id: Ibecea848fcca24709847931f5e02a7c981c4d277

6 years agoMerge "Add \b to regexes in BlockLevelPass to avoid confusing tr & track"
jenkins-bot [Sat, 20 May 2017 10:24:55 +0000 (10:24 +0000)]
Merge "Add \b to regexes in BlockLevelPass to avoid confusing tr & track"

6 years agoMerge "More magic word translations for Catalan (ca)"
jenkins-bot [Sat, 20 May 2017 10:15:01 +0000 (10:15 +0000)]
Merge "More magic word translations for Catalan (ca)"

6 years agoAdd release notes for T151633
Sébastien Santoro [Sat, 20 May 2017 09:35:45 +0000 (09:35 +0000)]
Add release notes for T151633

This is a follow-up for f87b3b68860e.

Thanks to @Sfic to have submitted this solution.

Bug: T151633
Change-Id: Ia87d925f81be68a69b9b5f9893b7fc71afe950db

6 years agoMerge "Use Devanagari digits for list items on ne.wikipedia"
jenkins-bot [Sat, 20 May 2017 06:22:41 +0000 (06:22 +0000)]
Merge "Use Devanagari digits for list items on ne.wikipedia"

6 years agoMerge "Fix the web updater"
jenkins-bot [Sat, 20 May 2017 02:06:26 +0000 (02:06 +0000)]
Merge "Fix the web updater"

6 years agoAdd \b to regexes in BlockLevelPass to avoid confusing tr & track
Brion Vibber [Fri, 19 May 2017 22:45:48 +0000 (00:45 +0200)]
Add \b to regexes in BlockLevelPass to avoid confusing tr & track

With TimedMediaHandler in video.js mode, videos can be inline,
without a wrapper div.

Previously, in this mode two paragraphs where one contained a
video would end up merged into one paragraph, due to BlockLevelPass
matching "<track .../>" against "<tr" in its regexes.

Added \b to a couple of the regexes to protect against such errors,
and corrected a parser test case that had bad output listed, where
"<link .../>" matched against "<li".

Bug: T165817
Change-Id: I06e82b881f5ebddae5e7df7fb940adfa54f6b659

6 years agoHack around icu breakage for fa sorting
Brian Wolff [Fri, 19 May 2017 21:32:00 +0000 (21:32 +0000)]
Hack around icu breakage for fa sorting

Bug: T139110
Change-Id: I35bcdaf309f595258289f01bbe5713ce6d1ffad1

6 years agoFix the web updater
Paladox [Fri, 19 May 2017 20:43:26 +0000 (20:43 +0000)]
Fix the web updater

It kept failing with Error: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ESCAPE '`'' at line 1 (localhost)

Bug: T165805
Change-Id: I2671415fc34b1e6226104c88ca21fafc860bb7fb

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 19 May 2017 20:08:33 +0000 (22:08 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Icd2487d8cf826e9736277723e84e2520106b2a5c

6 years agoMerge "Add type hint to ThumbnailRenderJob::hitThumbUrl"
jenkins-bot [Fri, 19 May 2017 19:40:45 +0000 (19:40 +0000)]
Merge "Add type hint to ThumbnailRenderJob::hitThumbUrl"

6 years agoMerge "Add workaround for HHVM issue 6206"
jenkins-bot [Fri, 19 May 2017 19:33:48 +0000 (19:33 +0000)]
Merge "Add workaround for HHVM issue 6206"

6 years agoMerge "Add missing doUpdates() call to refreshLinks.php"
jenkins-bot [Fri, 19 May 2017 19:33:36 +0000 (19:33 +0000)]
Merge "Add missing doUpdates() call to refreshLinks.php"

6 years agoMerge "Avoid postgres PrefixSearchTest failures due to collation differences"
jenkins-bot [Fri, 19 May 2017 19:33:33 +0000 (19:33 +0000)]
Merge "Avoid postgres PrefixSearchTest failures due to collation differences"

6 years agoAdd type hint to ThumbnailRenderJob::hitThumbUrl
Aaron Schulz [Fri, 19 May 2017 19:17:27 +0000 (12:17 -0700)]
Add type hint to ThumbnailRenderJob::hitThumbUrl

Change-Id: Ifab9d74ae9147349b0a3417f35088b96ee47b6fa

6 years agoAdd missing doUpdates() call to refreshLinks.php
Aaron Schulz [Wed, 17 May 2017 18:56:40 +0000 (11:56 -0700)]
Add missing doUpdates() call to refreshLinks.php

Follows-up b8b01aa589ce which accidentally removed this call.

Bug: T157545
Change-Id: Id4efdccb60e7829269df601b83f64288f6190db4

6 years agoAdd workaround for HHVM issue 6206
Marius Hoch [Fri, 19 May 2017 18:50:58 +0000 (20:50 +0200)]
Add workaround for HHVM issue 6206

Just use the actual global on HHVM, like we do on
Zend, but avoid hitting the warning.

This is a workaround for https://github.com/facebook/hhvm/issues/6206

Bug: T111641
Change-Id: I15ef0e90827c94a8b2609484b0dddcb78f04284c

6 years agoUse Devanagari digits for list items on ne.wikipedia
Sébastien Santoro [Fri, 19 May 2017 13:17:20 +0000 (13:17 +0000)]
Use Devanagari digits for list items on ne.wikipedia

Nepalese uses Devanagari, so we wish to use this alphabet for
list items' digits.

Bug: T151633
Change-Id: Id9cb42932fd8b8aa2cfb5418c4a3cd16ec37a60e

6 years agoMerge "MediaSearchWidget: Only resize new results"
jenkins-bot [Fri, 19 May 2017 16:25:39 +0000 (16:25 +0000)]
Merge "MediaSearchWidget: Only resize new results"

6 years agoMerge "Improve HTTP logging"
jenkins-bot [Fri, 19 May 2017 15:48:47 +0000 (15:48 +0000)]
Merge "Improve HTTP logging"

6 years agoMediaSearchWidget: Only resize new results
Thalia [Wed, 17 May 2017 17:13:17 +0000 (19:13 +0200)]
MediaSearchWidget: Only resize new results

When repositioning images based on the "change" event,
ignore images that have already been assigned to a row.

Bug: T163727
Change-Id: Ida7556d8848f98d97d82aef9caf5c1d43bb47d7b

6 years agoMerge "Tests: correct order of assertEquals arguments"
jenkins-bot [Fri, 19 May 2017 12:47:11 +0000 (12:47 +0000)]
Merge "Tests: correct order of assertEquals arguments"

6 years agoMerge "MimeAnalyzer: Detect magic bytes for mp3"
jenkins-bot [Fri, 19 May 2017 12:14:27 +0000 (12:14 +0000)]
Merge "MimeAnalyzer: Detect magic bytes for mp3"

6 years agoTests: correct order of assertEquals arguments
Derk-Jan Hartman [Fri, 19 May 2017 10:38:36 +0000 (12:38 +0200)]
Tests: correct order of assertEquals arguments

Change-Id: Ib8d1e8aa92172a9abc0495dc0c18ea5df850dd5e

6 years agoMimeAnalyzer: Detect magic bytes for mp3
Derk-Jan Hartman [Fri, 19 May 2017 11:33:25 +0000 (13:33 +0200)]
MimeAnalyzer: Detect magic bytes for mp3

Unit tests in follow up patch

Bug: T115170
Change-Id: Ie1a63aa319cebbb2efb3cdc478416f5947078cbe

6 years agoMerge "ContribsPager: Use one TemplateParser instance"
jenkins-bot [Fri, 19 May 2017 10:08:15 +0000 (10:08 +0000)]
Merge "ContribsPager: Use one TemplateParser instance"

6 years agoMerge "EnhancedChangesList: Use one TemplateParser instance"
jenkins-bot [Fri, 19 May 2017 10:08:12 +0000 (10:08 +0000)]
Merge "EnhancedChangesList: Use one TemplateParser instance"

6 years agoMerge "TemplateParser: Improve cache integrity check failure scenario"
jenkins-bot [Fri, 19 May 2017 09:14:06 +0000 (09:14 +0000)]
Merge "TemplateParser: Improve cache integrity check failure scenario"

6 years agoImprove HTTP logging
Tim Starling [Fri, 28 Apr 2017 01:32:44 +0000 (11:32 +1000)]
Improve HTTP logging

* Log HTTP debug lines to the "http" channel instead of wfDebug()
* Add the ability to do debug logging to MultiHttpClient
* Add a static method Http::createMultiClient() which provides a
  MultiHttpClient configured similarly to the way individual requests
  are configured, respecting the wiki's $wgHTTPTimeout and writing debug
  logs.
* In EtcdConfig, pass the logger instance through to the MultiHttpClient
  backend.

Change-Id: Ic5bdcb0cae95d7b3715ab5261758be082751c3ff

6 years agoAvoid postgres PrefixSearchTest failures due to collation differences
Aaron Schulz [Fri, 19 May 2017 00:40:06 +0000 (17:40 -0700)]
Avoid postgres PrefixSearchTest failures due to collation differences

Bug: T75174
Change-Id: I6b1df27ca6ae5c2da46134be3dbd7aed404d9601

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 18 May 2017 19:58:13 +0000 (21:58 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I9a4201e523e0e37756d4b70c7b85fc670a6fa1d7

6 years agoMerge "Make sure unique keys carry over to postgres table duplicates"
jenkins-bot [Thu, 18 May 2017 18:09:25 +0000 (18:09 +0000)]
Merge "Make sure unique keys carry over to postgres table duplicates"

6 years agoMerge "Introduce wgRelevantPageIsProbablyEditable"
jenkins-bot [Thu, 18 May 2017 16:01:26 +0000 (16:01 +0000)]
Merge "Introduce wgRelevantPageIsProbablyEditable"

6 years agoIntroduce wgRelevantPageIsProbablyEditable
James D. Forrester [Mon, 15 May 2017 10:12:44 +0000 (11:12 +0100)]
Introduce wgRelevantPageIsProbablyEditable

This is equivalent to the existing variable wgIsProbablyEditable and in
keeping with wgRelevantPageName/wgRelevantArticleId; this is done as an
alternative to making a breaking change to the semantics of the former,
as that might cause issues for users who expect wgIsProbablyEditable to
return true on [[Foo]], but false on [[Special:Move/Foo]] and similar.

Change-Id: I6c6ca1cfd93e7be917952980f1e1d57aec3a1292

6 years agoRemove Selenium tests written in Ruby
Željko Filipin [Tue, 21 Mar 2017 11:10:46 +0000 (12:10 +0100)]
Remove Selenium tests written in Ruby

New Selenium tests in Node.js are in tests/selenium.

Bug: T164004
Change-Id: I3ddeecb4f012ba4a614b3ada81c5926da28556f4
Depends-On: I062d68458d8f472d636f1ae15f4fc37110460854

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 17 May 2017 20:37:00 +0000 (22:37 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ie2f793b769f66378edf72e616dfdd2a344e95987

6 years agoMerge "Apply EXIF rotation to X-Content-Dimensions"
jenkins-bot [Wed, 17 May 2017 19:34:42 +0000 (19:34 +0000)]
Merge "Apply EXIF rotation to X-Content-Dimensions"

6 years agoMerge "ApiLogin: i18n for 'Aborted' reasons"
jenkins-bot [Wed, 17 May 2017 18:00:53 +0000 (18:00 +0000)]
Merge "ApiLogin: i18n for 'Aborted' reasons"

6 years agoResources.php: Add missing dependencies to module 'mediawiki.user'
Fomafix [Wed, 17 May 2017 16:20:20 +0000 (18:20 +0200)]
Resources.php: Add missing dependencies to module 'mediawiki.user'

Change-Id: Ie68418a47d4b4b98fac2b275def392294bd01909

6 years agoMerge "RCFilters UI: Actually backwards-compat instead of overriding false"
jenkins-bot [Wed, 17 May 2017 09:40:09 +0000 (09:40 +0000)]
Merge "RCFilters UI: Actually backwards-compat instead of overriding false"

6 years agoMake sure unique keys carry over to postgres table duplicates
Aaron Schulz [Wed, 17 May 2017 02:20:42 +0000 (19:20 -0700)]
Make sure unique keys carry over to postgres table duplicates

This fixes BotPasswordTest failures.

Change-Id: I81003187af0c57020f9fc4cbcd2606e71907a903

6 years agoRCFilters UI: Actually backwards-compat instead of overriding false
Moriel Schottlender [Wed, 17 May 2017 00:35:43 +0000 (17:35 -0700)]
RCFilters UI: Actually backwards-compat instead of overriding false

Another typo in the code made highlight feature always load as false
when you loaded a saved filter.

Bug: T165437
Change-Id: I0e0efa3576659e4145b20013e4af7a06e4e7c0ff

6 years agoContribsPager: Use one TemplateParser instance
Kunal Mehta [Tue, 16 May 2017 22:49:03 +0000 (15:49 -0700)]
ContribsPager: Use one TemplateParser instance

TemplateParser has an instance cache to avoid reading from APC
repeatedly for the same template, but that only works if the code uses
the same TemplateParser object.

Change-Id: I59e37306c5a3216cf8ed3bfef9c80d50934a9146

6 years agoEnhancedChangesList: Use one TemplateParser instance
Kunal Mehta [Tue, 16 May 2017 22:43:35 +0000 (15:43 -0700)]
EnhancedChangesList: Use one TemplateParser instance

TemplateParser has an instance cache to avoid reading from APC
repeatedly for the same template, but that only works if the code uses
the same TemplateParser object.

Noticed while investigating T163154.

Change-Id: I645895a0965f7150e9a5aebc5a7788f27aa5a26d

6 years agoTemplateParser: Improve cache integrity check failure scenario
Kunal Mehta [Tue, 16 May 2017 22:40:08 +0000 (15:40 -0700)]
TemplateParser: Improve cache integrity check failure scenario

Previously, if the cache integrity check failed then it would emit a
warning but then continue to use the code. The integrity check could
genuinely fail if the secret key was changed, if the cache was
truncated, or other edge case scenarios.

Now TemplateParser will recompile if the cache fails the integrity
check, and then update the cache with the newly compiled version.

Bug: T163154
Change-Id: I9a6c8d528f84cfbabf402cfaf6468c162fab1f15

6 years agoUpdate OOjs UI to v0.21.4
James D. Forrester [Tue, 16 May 2017 22:34:01 +0000 (23:34 +0100)]
Update OOjs UI to v0.21.4

Release notes:
 https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.21.4

Depends-On: I676c9aadbf4739437b94ec729cc4fe47ed19c886
Change-Id: Ie9f8e42c46948688495cbd80e778b484c7b03982

6 years agoMerge "Sync up with Parsoid parserTests.txt"
jenkins-bot [Tue, 16 May 2017 19:47:22 +0000 (19:47 +0000)]
Merge "Sync up with Parsoid parserTests.txt"

6 years agoSync up with Parsoid parserTests.txt
C. Scott Ananian [Tue, 16 May 2017 19:12:22 +0000 (15:12 -0400)]
Sync up with Parsoid parserTests.txt

This now aligns with Parsoid commit d163deefa3aaeb0926af09a91075d6a611b36363

Change-Id: I9e543f0803247ffc264e634bf66b6bd0e143f187

6 years agoMerge "Improve output of refreshImageMetadata and refreshFileHeaders"
jenkins-bot [Tue, 16 May 2017 19:12:02 +0000 (19:12 +0000)]
Merge "Improve output of refreshImageMetadata and refreshFileHeaders"

6 years agoApiLogin: i18n for 'Aborted' reasons
Brad Jorsch [Tue, 16 May 2017 14:14:03 +0000 (10:14 -0400)]
ApiLogin: i18n for 'Aborted' reasons

Ia6c402a4 did it for 'Failed', but overlooked 'Aborted'.

Change-Id: I3f7379af3609c30f10ea8c648f2ec840310e8d97

6 years agoApply EXIF rotation to X-Content-Dimensions
Gilles Dubuc [Tue, 16 May 2017 12:56:26 +0000 (14:56 +0200)]
Apply EXIF rotation to X-Content-Dimensions

Also adds integration tests for a few formats.

Bug: T150741
Change-Id: I686f7ef42457faf5bc688e60e6ce09a8550ca5aa

6 years agoMerge "Resources.php: Add missing dependencies to module 'mediawiki.util'"
jenkins-bot [Tue, 16 May 2017 09:02:00 +0000 (09:02 +0000)]
Merge "Resources.php: Add missing dependencies to module 'mediawiki.util'"

6 years agoImprove output of refreshImageMetadata and refreshFileHeaders
Gilles Dubuc [Mon, 15 May 2017 21:16:35 +0000 (23:16 +0200)]
Improve output of refreshImageMetadata and refreshFileHeaders

Bug: T150741
Change-Id: Ie5f787fd77ecd31b8852d0f66de912baced4ca46

6 years agoResources.php: Add missing dependencies to module 'mediawiki.util'
Fomafix [Mon, 15 May 2017 19:38:32 +0000 (21:38 +0200)]
Resources.php: Add missing dependencies to module 'mediawiki.util'

Change-Id: Iac3070adc36533ae046f57ecc7c772247b42420d

6 years agoMerge "registration: Move attributes out of the top level"
jenkins-bot [Tue, 16 May 2017 04:00:28 +0000 (04:00 +0000)]
Merge "registration: Move attributes out of the top level"

6 years agoregistration: Move attributes out of the top level
Kunal Mehta [Fri, 2 Dec 2016 06:02:28 +0000 (22:02 -0800)]
registration: Move attributes out of the top level

This moves attributes out of the top level, and namespaces them under
each extension. If the extension that it belongs to is not installed,
the attribute is not exported and dropped.

The full name of the attribute is the name of the extension plus the
name of the attribute key. This enforces the recommendation that the
attribute name start with the extension's name.

Add test coverage for attributes under manifest_version 1 and 2.

Bug: T133627
Depends-On: I5a148763f68989c8da313a4fb1d0213658ee4495
Depends-On: I5a148763f68989c8da313a4fb1d0213658ee4459
Change-Id: I8613a027c56e2c9d2c6a83ca14749eb1c8fc23be

6 years agoMerge "registration: Deprecate not having manifest_version set"
jenkins-bot [Tue, 16 May 2017 02:44:39 +0000 (02:44 +0000)]
Merge "registration: Deprecate not having manifest_version set"

6 years agoregistration: Deprecate not having manifest_version set
Kunal Mehta [Mon, 15 May 2017 23:33:22 +0000 (16:33 -0700)]
registration: Deprecate not having manifest_version set

Emit a wfDeprecated() warning for each extension that does not have
manifest_version set.

Because we don't have any mechanism to cache warnings, just disable the
cache if any deprecation warnings are emitted. This ensures that the
warnings are shown on every page load instead of probably once a day.

Bug: T155610
Change-Id: I163a84ae1d381ca5bd67b4b317c04f9f51c066ea

6 years agoMerge "OutputPage: Remove deprecated addParserOutputNoText, getHeadLinks methods"
jenkins-bot [Tue, 16 May 2017 00:21:07 +0000 (00:21 +0000)]
Merge "OutputPage: Remove deprecated addParserOutputNoText, getHeadLinks methods"

6 years agoMerge "Removed deprecated ExtractThumbParameters hook"
jenkins-bot [Tue, 16 May 2017 00:21:03 +0000 (00:21 +0000)]
Merge "Removed deprecated ExtractThumbParameters hook"

6 years agoMerge "EditPage: Preserve &ooui=1 / &ooui=0 from URL after preview"
jenkins-bot [Mon, 15 May 2017 23:19:24 +0000 (23:19 +0000)]
Merge "EditPage: Preserve &ooui=1 / &ooui=0 from URL after preview"

6 years agoMerge "ParserOptions: Include wrapping class in options hash"
jenkins-bot [Mon, 15 May 2017 23:12:28 +0000 (23:12 +0000)]
Merge "ParserOptions: Include wrapping class in options hash"

6 years agoRCFilters: Actually be consistent when storing 'highlight' state
Moriel Schottlender [Mon, 15 May 2017 19:10:07 +0000 (12:10 -0700)]
RCFilters: Actually be consistent when storing 'highlight' state

Saved queries are storing *filter* definitions, not parameters, so
highlight state (dictating whether highlights are enabled) are supposed
to be stored as boolean.

A previous fix that was meant to make sure we store and handle all
*parameters* as strings '0' and '1' was a bit overzealous, and stored
highlight state in saved queries as '1' and '0' too. The current state
then compared that to the filter-state, which produces false/true.

This resulting in saved queries only being matched to the current
state as never true, because the comparison goes by actual obejct
key-values, not symbolic values.

Bug: T165381
Change-Id: Ifdec3a8c058a0e004304e48a857c58639928b36f

6 years agoEditPage: Preserve &ooui=1 / &ooui=0 from URL after preview
Bartosz Dziewoński [Mon, 15 May 2017 18:33:37 +0000 (20:33 +0200)]
EditPage: Preserve &ooui=1 / &ooui=0 from URL after preview

Bug: T165237
Change-Id: Ia546159b45fabb1256f63f888412703ca3eba2e9

6 years agoMerge "RCFilters: Rephrase 'unset' to 'remove' in default option menu"
jenkins-bot [Mon, 15 May 2017 14:40:36 +0000 (14:40 +0000)]
Merge "RCFilters: Rephrase 'unset' to 'remove' in default option menu"

6 years agoMerge "RCFilters: Always put highlight values in the URL"
jenkins-bot [Mon, 15 May 2017 14:33:31 +0000 (14:33 +0000)]
Merge "RCFilters: Always put highlight values in the URL"

6 years agoMerge "RCFilters: Fix getFilterRepresentation to consider '0' as false"
jenkins-bot [Mon, 15 May 2017 12:45:55 +0000 (12:45 +0000)]
Merge "RCFilters: Fix getFilterRepresentation to consider '0' as false"

6 years agoOutputPage: Remove deprecated addParserOutputNoText, getHeadLinks methods
James D. Forrester [Thu, 13 Apr 2017 22:54:44 +0000 (15:54 -0700)]
OutputPage: Remove deprecated addParserOutputNoText, getHeadLinks methods

Change-Id: Idc55e7bb0f7bde8466192a81886f205de60c092c

6 years agoRemoved deprecated ExtractThumbParameters hook
James D. Forrester [Thu, 13 Apr 2017 22:49:47 +0000 (15:49 -0700)]
Removed deprecated ExtractThumbParameters hook

Depends-On: I827c61a5a340d4f107478174263e4a5d385398f4
Change-Id: I97e820d78d8041c40fb6e553c4081c676602462c

6 years agoParserOptions: Include wrapping class in options hash
Brad Jorsch [Fri, 12 May 2017 16:28:22 +0000 (12:28 -0400)]
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

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 14 May 2017 19:54:43 +0000 (21:54 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I4b723b8eac7d7df85781495c396db74ea0021dbc

6 years agoRCFilters: Always put highlight values in the URL
Moriel Schottlender [Sat, 13 May 2017 18:21:14 +0000 (11:21 -0700)]
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

6 years agoRCFilters: Fix getFilterRepresentation to consider '0' as false
Moriel Schottlender [Sat, 13 May 2017 19:28:38 +0000 (12:28 -0700)]
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

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 13 May 2017 19:54:02 +0000 (21:54 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ia4e0aad6e4f8ee1f1cba85cf72c77d83bffae7f3

6 years agoMerge "resourceloader: Add filename to validateScriptFile cache key"
jenkins-bot [Sat, 13 May 2017 00:36:43 +0000 (00:36 +0000)]
Merge "resourceloader: Add filename to validateScriptFile cache key"

6 years agoMerge "resourceloader: Simplify validateScriptFile() with getWithSetCallback"
jenkins-bot [Sat, 13 May 2017 00:32:10 +0000 (00:32 +0000)]
Merge "resourceloader: Simplify validateScriptFile() with getWithSetCallback"

6 years agoresourceloader: Add filename to validateScriptFile cache key
Timo Tijhof [Fri, 12 May 2017 18:05:20 +0000 (19:05 +0100)]
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

6 years agoMerge "ApiQueryRevisions: Don't be so tricky handling rvstartid/rvendid"
jenkins-bot [Fri, 12 May 2017 22:45:23 +0000 (22:45 +0000)]
Merge "ApiQueryRevisions: Don't be so tricky handling rvstartid/rvendid"

6 years agoRCFilters: Rephrase 'unset' to 'remove' in default option menu
Moriel Schottlender [Fri, 12 May 2017 22:37:38 +0000 (15:37 -0700)]
RCFilters: Rephrase 'unset' to 'remove' in default option menu

Bug: T164861
Change-Id: I13174ac6812532fe0537cbba0f649cf330bf0c57

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 12 May 2017 20:23:36 +0000 (22:23 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I411ee26a2f6dd7199c42bc3a8e70fde852255ca7

6 years agoresourceloader: Simplify validateScriptFile() with getWithSetCallback
Timo Tijhof [Fri, 12 May 2017 18:03:12 +0000 (19:03 +0100)]
resourceloader: Simplify validateScriptFile() with getWithSetCallback

* Simplify by using early return and getWithSetCallback.
* Add TTL (previously indefinite, now 1 week).

Bug: T52919
Change-Id: Ic95ba392cdb3bcc8081c77d2c2a3240548bed366

6 years agoApiQueryRevisions: Don't be so tricky handling rvstartid/rvendid
Brad Jorsch [Thu, 11 May 2017 22:18:44 +0000 (18:18 -0400)]
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

6 years agoRefactor filter-specific logic into group models
Moriel Schottlender [Tue, 9 May 2017 23:28:40 +0000 (16:28 -0700)]
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

6 years agoRCFilters UI: Add a placeholder to SavedLinksListWidget when it's empty
Roan Kattouw [Thu, 11 May 2017 01:28:39 +0000 (18:28 -0700)]
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

6 years agoRCFilters UI: Add tooltip to saved links items
Roan Kattouw [Thu, 11 May 2017 01:26:42 +0000 (18:26 -0700)]
RCFilters UI: Add tooltip to saved links items

Bug: T164861
Change-Id: Ic7c38c59c53d4d83b959eff36d4b1d198bb654ea

6 years agoMerge "Pager class for filtering by date range"
jenkins-bot [Fri, 12 May 2017 13:16:58 +0000 (13:16 +0000)]
Merge "Pager class for filtering by date range"

6 years agoMerge "RCFilters: Treat saved query with multiple spaces as empty"
jenkins-bot [Fri, 12 May 2017 13:16:23 +0000 (13:16 +0000)]
Merge "RCFilters: Treat saved query with multiple spaces as empty"

6 years agoMerge "RCFilters: Actually read/write highlight parameter"
jenkins-bot [Fri, 12 May 2017 13:15:47 +0000 (13:15 +0000)]
Merge "RCFilters: Actually read/write highlight parameter"

6 years agoPager class for filtering by date range
Geoffrey Mon [Mon, 12 Dec 2016 14:23:54 +0000 (09:23 -0500)]
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

6 years agoMore magic word translations for Catalan (ca)
Toni Hermoso Pulido [Sun, 7 May 2017 15:43:16 +0000 (17:43 +0200)]
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

6 years agoMerge "Add X-Content-Dimensions support to DjVu"
jenkins-bot [Fri, 12 May 2017 03:18:31 +0000 (03:18 +0000)]
Merge "Add X-Content-Dimensions support to DjVu"

6 years agoMerge "Factor out changetag name validation check"
jenkins-bot [Fri, 12 May 2017 02:25:43 +0000 (02:25 +0000)]
Merge "Factor out changetag name validation check"

6 years agoMerge "RCFilters UI: Add down indicator to SavedLinksListWidget button"
jenkins-bot [Fri, 12 May 2017 01:07:38 +0000 (01:07 +0000)]
Merge "RCFilters UI: Add down indicator to SavedLinksListWidget button"

6 years agoMerge "RCFilters UI: Don't remove removed saved links twice"
jenkins-bot [Fri, 12 May 2017 01:07:34 +0000 (01:07 +0000)]
Merge "RCFilters UI: Don't remove removed saved links twice"

6 years agoRCFilters: Treat saved query with multiple spaces as empty
Moriel Schottlender [Fri, 12 May 2017 00:52:45 +0000 (17:52 -0700)]
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

6 years agoRCFilters: Actually read/write highlight parameter
Moriel Schottlender [Thu, 11 May 2017 23:24:54 +0000 (16:24 -0700)]
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

6 years agoMerge "Gate option to save RC filters to default false"
jenkins-bot [Thu, 11 May 2017 21:45:45 +0000 (21:45 +0000)]
Merge "Gate option to save RC filters to default false"

6 years agoMerge "mw.Upload.Dialog: Define .static.name"
jenkins-bot [Thu, 11 May 2017 21:38:03 +0000 (21:38 +0000)]
Merge "mw.Upload.Dialog: Define .static.name"

6 years agoMerge "Check for null before calling a textResults method to (fixes T165091)"
jenkins-bot [Thu, 11 May 2017 21:36:06 +0000 (21:36 +0000)]
Merge "Check for null before calling a textResults method to (fixes T165091)"

6 years agoMerge "Fix comment typo in MimeMagic.php"
jenkins-bot [Thu, 11 May 2017 21:29:36 +0000 (21:29 +0000)]
Merge "Fix comment typo in MimeMagic.php"