lhc/web/wiklou.git
8 years agoOverride momentjs's digit transform logic with MW's
Roan Kattouw [Sat, 2 Apr 2016 16:15:52 +0000 (19:15 +0300)]
Override momentjs's digit transform logic with MW's

Override the digit transform logic from momentjs's locale files
with our own logic based on MW's digit transform tables, so
we will definitely use the same transform tables, and so we
can respect $wgTranslateNumerals.

Bug: T123999
Change-Id: Icea642f41156fb637e3e4b86abeab878fd456601

8 years agoregistration: Support skipFunction module definitions
James D. Forrester [Tue, 19 Apr 2016 01:13:18 +0000 (18:13 -0700)]
registration: Support skipFunction module definitions

Change-Id: I9c5cea3e8df1fae001d4d98c0782a04dec803776

8 years agoMerge "Reject usernames with namespace or interwiki prefixes"
jenkins-bot [Mon, 18 Apr 2016 23:30:23 +0000 (23:30 +0000)]
Merge "Reject usernames with namespace or interwiki prefixes"

8 years agoMerge "Enforce $wgReadOnly for job queues"
jenkins-bot [Mon, 18 Apr 2016 22:41:50 +0000 (22:41 +0000)]
Merge "Enforce $wgReadOnly for job queues"

8 years agoAllow tag names for SqlBagOStuff consistent hashing
Aaron Schulz [Mon, 18 Apr 2016 19:09:54 +0000 (12:09 -0700)]
Allow tag names for SqlBagOStuff consistent hashing

This is needed to avoid poor hit rates in multi-DC setups

Change-Id: I8830bd6bffa4619e31609676527282ef9af0c76c

8 years agoMerge "DateTimeInputWidget: Set type before calling parent constructor"
jenkins-bot [Mon, 18 Apr 2016 21:36:16 +0000 (21:36 +0000)]
Merge "DateTimeInputWidget: Set type before calling parent constructor"

8 years agoEnforce $wgReadOnly for job queues
Aaron Schulz [Fri, 25 Mar 2016 19:52:39 +0000 (12:52 -0700)]
Enforce $wgReadOnly for job queues

Bug: T130795
Change-Id: I9d8cf919de80dbe855086b9c590c0a0f20dc33b9

8 years agoresourceloader: Use feature test instead of UA sniffing
Timo Tijhof [Sat, 20 Feb 2016 15:22:22 +0000 (15:22 +0000)]
resourceloader: Use feature test instead of UA sniffing

Converting to a feature test reduces complexity of the startup module, and
makes the blacklist more meaningful - allowing us to safely remove some
unnecessary feature guards and polyfills.

It'll also provide unsupported browsers a much better experience. Previously,
unsupported browsers got the payload for Grade A runtime. Many of which would
likely fatal due to unimplemented DOM and JS methods. With the capability
filter in this commit, the client will only initialise the environment if the
browser is capable - falling back to Grade C otherwise.

The feature-test that replaces the user-agent filter in this commit is 99.96%
effectively the same - based on a 7 day analytics campaign on all Wikimedia
wikis (see T102318 for details).

Bug: T102318
Change-Id: I847b3f5f80f1eef3f57bbe7518768468e271082b

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 18 Apr 2016 19:59:44 +0000 (21:59 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I3777ce409669883f0d7ac20ce834bf8526b6dfea

8 years agoDateTimeInputWidget: Set type before calling parent constructor
Brad Jorsch [Mon, 18 Apr 2016 18:45:27 +0000 (14:45 -0400)]
DateTimeInputWidget: Set type before calling parent constructor

This way when the parent calls setValue() which calls cleanUpValue(), it
cleans up the value correctly.

Change-Id: I9dcfa74ca03f6aded1dd0f9593d24b0986596b41

8 years agoMerge "Use new TWN template for log-action-filter-* qqq messages"
jenkins-bot [Mon, 18 Apr 2016 16:55:11 +0000 (16:55 +0000)]
Merge "Use new TWN template for log-action-filter-* qqq messages"

8 years agoMerge "Test coverage WatchedItemStore::duplicateAllAssociatedEntries to 100%"
jenkins-bot [Mon, 18 Apr 2016 15:17:07 +0000 (15:17 +0000)]
Merge "Test coverage WatchedItemStore::duplicateAllAssociatedEntries to 100%"

8 years agoMerge "Test coverage WatchedItemStore::addWatchBatchForUser to 100%"
jenkins-bot [Mon, 18 Apr 2016 15:17:03 +0000 (15:17 +0000)]
Merge "Test coverage WatchedItemStore::addWatchBatchForUser to 100%"

8 years agoMerge "Reject usernames with # as user-type API parameters"
jenkins-bot [Mon, 18 Apr 2016 15:16:58 +0000 (15:16 +0000)]
Merge "Reject usernames with # as user-type API parameters"

8 years agoReject usernames with namespace or interwiki prefixes
Gergő Tisza [Sat, 16 Apr 2016 17:36:33 +0000 (17:36 +0000)]
Reject usernames with namespace or interwiki prefixes

User::getCanonicalName silently stripped namepace/iw prefixes,
resulting in weird behavior (e.g. entering 'Template:Foo' in the
registration form username field was accepted, but user 'Foo' was
created). Explicitly reject such names instead.

Also remove leading whitespace from test cases testing for something
else.

Bug: T94656
Change-Id: Idfb22f998cb069fca24abcf5809afd6e0324b0ae

8 years agoMerge "Fix RecentChange::parseParams @return docs"
jenkins-bot [Mon, 18 Apr 2016 12:25:30 +0000 (12:25 +0000)]
Merge "Fix RecentChange::parseParams @return docs"

8 years agoTest coverage WatchedItemStore::duplicateAllAssociatedEntries to 100%
addshore [Mon, 18 Apr 2016 11:32:46 +0000 (12:32 +0100)]
Test coverage WatchedItemStore::duplicateAllAssociatedEntries to 100%

Change-Id: I3d686fda1175a9ae5e4244b9ba8cfdb416950ebd

8 years agoTest coverage WatchedItemStore::addWatchBatchForUser to 100%
addshore [Mon, 18 Apr 2016 11:25:54 +0000 (12:25 +0100)]
Test coverage WatchedItemStore::addWatchBatchForUser to 100%

Change-Id: I6ff916519af87a40187d86149b0b72c2ab5a5f26

8 years agoFix RecentChange::parseParams @return docs
addshore [Mon, 18 Apr 2016 10:06:09 +0000 (11:06 +0100)]
Fix RecentChange::parseParams @return docs

Per the docs of unserialize:
In case the passed string is not unserializeable, false is returned.

Also as we can not guarentee an array was serialized in
rc_params we cant say it will always be an array...
Quite often this is just an empty string which will
result in: "s:0:"";" (not an array)....

Change-Id: Ib22f9f7468a23ce3d4f145d47f8514d08be6c957

8 years agoMerge "HTMLForm code style fixes"
jenkins-bot [Mon, 18 Apr 2016 08:05:41 +0000 (08:05 +0000)]
Merge "HTMLForm code style fixes"

8 years agoMerge "mediawiki.special.upload: Use formatversion=2 for API requests"
jenkins-bot [Mon, 18 Apr 2016 08:05:34 +0000 (08:05 +0000)]
Merge "mediawiki.special.upload: Use formatversion=2 for API requests"

8 years agoMerge "parserTests.php: fix three bitrot bugs with --record"
jenkins-bot [Mon, 18 Apr 2016 07:45:39 +0000 (07:45 +0000)]
Merge "parserTests.php: fix three bitrot bugs with --record"

8 years agoMerge "Move disable of preference 'enotifminoredits'"
jenkins-bot [Mon, 18 Apr 2016 07:43:32 +0000 (07:43 +0000)]
Merge "Move disable of preference 'enotifminoredits'"

8 years agoMerge "Rephrase watchlistedit-clear-title"
jenkins-bot [Mon, 18 Apr 2016 07:42:10 +0000 (07:42 +0000)]
Merge "Rephrase watchlistedit-clear-title"

8 years agoMerge "search: getInterwikiResults returns array of SearchResultSets"
jenkins-bot [Mon, 18 Apr 2016 07:42:05 +0000 (07:42 +0000)]
Merge "search: getInterwikiResults returns array of SearchResultSets"

8 years agoMerge "Adding param documentation for Parser::internalParse()"
jenkins-bot [Mon, 18 Apr 2016 07:30:53 +0000 (07:30 +0000)]
Merge "Adding param documentation for Parser::internalParse()"

8 years agoMerge "Remove dead code from CategoryPager"
jenkins-bot [Mon, 18 Apr 2016 07:30:48 +0000 (07:30 +0000)]
Merge "Remove dead code from CategoryPager"

8 years agoMerge "Modify documentation of select() method for Database."
jenkins-bot [Mon, 18 Apr 2016 07:30:44 +0000 (07:30 +0000)]
Merge "Modify documentation of select() method for Database."

8 years agoMerge "API: Allow subclassing ApiQueryImageInfo"
jenkins-bot [Mon, 18 Apr 2016 07:30:37 +0000 (07:30 +0000)]
Merge "API: Allow subclassing ApiQueryImageInfo"

8 years agoModify documentation of select() method for Database.
Brian Wolff [Sun, 17 Apr 2016 19:41:28 +0000 (15:41 -0400)]
Modify documentation of select() method for Database.

* Add a note in Database.php that docs are in IDatabase.php,
maybe its just me, but I didn't realize that was where the docs
are (even though in retrospect that should have been obvious) and
wasted a lot of time because I didn't realize that.
* Change references to IDatabase::tableName() in doc to
DatabaseBase::tableName(), since tableName is not in the IDatabase
interface.
* Be explicit in docs for select() about which parts are safe for
user input. I think its important to be very explicit about this.

No code changes, just doc changes.

Change-Id: I3a66477afc6a5f54855062482ef04c2966e468f6

8 years agoAPI: Allow subclassing ApiQueryImageInfo
Derk-Jan Hartman [Sun, 17 Apr 2016 15:46:07 +0000 (17:46 +0200)]
API: Allow subclassing ApiQueryImageInfo

execute() references the static self::getInfo, which therefor cannot be
overriden by the subclass ApiQueryVideoInfo. Preferably, we'd fix the
implementation to not require this subclassing, but this will make
that transition easier. Use late static binding to make sure the
subclass implementation can be used.

Change-Id: Iab2d01abb9f9b3b799123d8ee344ea139e476576

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 17 Apr 2016 19:55:56 +0000 (21:55 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I7228c53f7cd77d7a19248b13d66afff01cfd6396

8 years agoUse new TWN template for log-action-filter-* qqq messages
Alex Monk [Sun, 17 Apr 2016 17:59:21 +0000 (18:59 +0100)]
Use new TWN template for log-action-filter-* qqq messages

Change-Id: I3ca1be738d552e72f5ddf66afdf0c74f0122ee0a

8 years agomediawiki.special.upload: Use formatversion=2 for API requests
Fomafix [Sun, 17 Apr 2016 11:20:53 +0000 (11:20 +0000)]
mediawiki.special.upload: Use formatversion=2 for API requests

This simplifies the processing of the response.

Change-Id: I2073ec2c017e4d5c5c7f786b45118516feea1aac

8 years agoKill obsolete check
matejsuchanek [Fri, 15 Apr 2016 20:11:27 +0000 (22:11 +0200)]
Kill obsolete check

Was a temporary fix for T126428 and was added in
c940fa8ec1f965ea23a3eb8c2d1eeccd994c124b.

Change-Id: Iad988f69068147cdc24c8829627875274540b16e

8 years agoHTMLForm code style fixes
Gergő Tisza [Sun, 17 Apr 2016 07:28:52 +0000 (07:28 +0000)]
HTMLForm code style fixes

Change-Id: I30612c7cfde1d76aff7fac24fb2b0033457fbc27

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 16 Apr 2016 20:43:27 +0000 (22:43 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I862b3058c7538e56264257b44bc0b0bff04f1da0

8 years agoRemove dead code from CategoryPager
umherirrender [Sat, 16 Apr 2016 10:16:48 +0000 (12:16 +0200)]
Remove dead code from CategoryPager

Remove dead code about an alternate sort on Special:Categories. This
also removes the unused system messages.
To get a list of the count of categories, it is possible to use
Special:MostLinkedCategories

Change-Id: Ie41218a28cde52222809eafe2e9e92e4a4e38a2e

8 years agoMerge "Put a high max limit of 60,000 on Special:LinkSearch"
jenkins-bot [Sat, 16 Apr 2016 18:41:03 +0000 (18:41 +0000)]
Merge "Put a high max limit of 60,000 on Special:LinkSearch"

8 years agoReject usernames with # as user-type API parameters
Gergő Tisza [Sat, 16 Apr 2016 17:45:39 +0000 (17:45 +0000)]
Reject usernames with # as user-type API parameters

Th API handles parameters of type 'user' as page titles, which resulted
in silently dropping # characters and anything following them.
Reject such usernames explicitly instead.

Bug: T132852
Change-Id: Iba8061b20d5e25de80ff30d09eb53939c97cdaac

8 years agoMerge "Remove experimental MCRD class"
jenkins-bot [Sat, 16 Apr 2016 01:21:44 +0000 (01:21 +0000)]
Merge "Remove experimental MCRD class"

8 years agoMerge "Title: Throw if newFromText is given an invalid value"
jenkins-bot [Fri, 15 Apr 2016 22:55:00 +0000 (22:55 +0000)]
Merge "Title: Throw if newFromText is given an invalid value"

8 years agoRemove experimental MCRD class
Aaron Schulz [Fri, 15 Apr 2016 22:21:04 +0000 (15:21 -0700)]
Remove experimental MCRD class

Change-Id: I0282240cb325037354d22bc0eef89780084611d2

8 years agoPut a high max limit of 60,000 on Special:LinkSearch
Brian Wolff [Fri, 15 Apr 2016 21:42:21 +0000 (17:42 -0400)]
Put a high max limit of 60,000 on Special:LinkSearch

LinkSearch uses inefficient paging. Previously there was no
max limit, then it was 10,000, but people on enwiki are complaining,
so put it up to something high, like 60,000, to fix the immediate
issue.

Special page should of course be changed to use efficient paging.

Bug: T130058
Change-Id: I0c4b1ad0138571bcf286ca88bceebf86b9a095f6

8 years agoMerge "mw.Api: Replace deprecated token names by 'csrf'"
jenkins-bot [Fri, 15 Apr 2016 20:51:08 +0000 (20:51 +0000)]
Merge "mw.Api: Replace deprecated token names by 'csrf'"

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 15 Apr 2016 19:57:25 +0000 (21:57 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I97436ec70e5c33350f413162201ced484c5a9484

8 years agoMerge "mediawiki.special.upload: Don't fail when trying to thumbnail invalid file"
jenkins-bot [Fri, 15 Apr 2016 19:11:07 +0000 (19:11 +0000)]
Merge "mediawiki.special.upload: Don't fail when trying to thumbnail invalid file"

8 years agoMerge "mediawiki.special.upload: Don't fail when invalid title is given"
jenkins-bot [Fri, 15 Apr 2016 19:11:02 +0000 (19:11 +0000)]
Merge "mediawiki.special.upload: Don't fail when invalid title is given"

8 years agoMerge "Avoid DBPerformance log warnings in SpecialPreferences"
jenkins-bot [Fri, 15 Apr 2016 19:04:15 +0000 (19:04 +0000)]
Merge "Avoid DBPerformance log warnings in SpecialPreferences"

8 years agoMerge "mediawiki.page.ready: Load 'SearchInputWidget' too"
jenkins-bot [Fri, 15 Apr 2016 18:52:22 +0000 (18:52 +0000)]
Merge "mediawiki.page.ready: Load 'SearchInputWidget' too"

8 years agomw.Api: Replace deprecated token names by 'csrf'
Fomafix [Fri, 15 Apr 2016 15:52:42 +0000 (15:52 +0000)]
mw.Api: Replace deprecated token names by 'csrf'

Since 65077ede the deprecated token names like 'edit' or 'options' generate
a warning.

Change-Id: I1587f66bd9e5cdb8cc24cf68eced1d28ae22f44e

8 years agoAvoid DBPerformance log warnings in SpecialPreferences
Aaron Schulz [Thu, 14 Apr 2016 23:22:54 +0000 (16:22 -0700)]
Avoid DBPerformance log warnings in SpecialPreferences

Preference views do not need the master DB.

Change-Id: Id0c3fc6d453b6af0eca8450107da6d554c822347

8 years agomediawiki.special.upload: Don't fail when trying to thumbnail invalid file
Bartosz Dziewoński [Thu, 14 Apr 2016 21:16:22 +0000 (23:16 +0200)]
mediawiki.special.upload: Don't fail when trying to thumbnail invalid file

The thumbnail spinner would spin forever if we never got a 'load' event
on the image.

Bug: T132242
Change-Id: I1c68ed185b58950c3648f56e07144bb29a8bed56

8 years agomediawiki.special.upload: Don't fail when invalid title is given
Bartosz Dziewoński [Mon, 4 Apr 2016 14:37:58 +0000 (16:37 +0200)]
mediawiki.special.upload: Don't fail when invalid title is given

If an invalid title was given (for example, anything including '['),
the destination title check would throw an exception and a spinner
would spin forever.

Change-Id: If6f02051383675817a0e2ad406dd71cab33fb5bf

8 years agoMerge "SpecialRunJobs: delegate error handling to MWExceptionHandler"
jenkins-bot [Thu, 14 Apr 2016 21:13:44 +0000 (21:13 +0000)]
Merge "SpecialRunJobs: delegate error handling to MWExceptionHandler"

8 years agoMerge "Fix UID test and make debugging easier"
jenkins-bot [Thu, 14 Apr 2016 20:43:58 +0000 (20:43 +0000)]
Merge "Fix UID test and make debugging easier"

8 years agoSpecialRunJobs: delegate error handling to MWExceptionHandler
Bryan Davis [Thu, 14 Apr 2016 20:08:38 +0000 (14:08 -0600)]
SpecialRunJobs: delegate error handling to MWExceptionHandler

Make the custom error handler that is installed to suppress Cookie
header errors delegate unhandled errors to the default MediaWiki error
handler. This will preserve fatal error logging for errors raised by
jobs.

Bug: T89169
Change-Id: I52ef544fa18351bf310b04b17ab4e0239020fe20

8 years agoAdding param documentation for Parser::internalParse()
Kaldari [Thu, 14 Apr 2016 20:01:08 +0000 (14:01 -0600)]
Adding param documentation for Parser::internalParse()

Change-Id: Id0adeff2c2fa940205f4b7692d27b45e3466be79

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 14 Apr 2016 19:58:54 +0000 (21:58 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I7264e3c32d5a088999af65c1e597a2ed6a400e27

8 years agoMerge "Follow-up Idb1202579: Add special-characters-group-greekextended to RL module"
jenkins-bot [Thu, 14 Apr 2016 19:12:07 +0000 (19:12 +0000)]
Merge "Follow-up Idb1202579: Add special-characters-group-greekextended to RL module"

8 years agoFollow-up Idb1202579: Add special-characters-group-greekextended to RL module
Ed Sanders [Thu, 14 Apr 2016 18:48:54 +0000 (19:48 +0100)]
Follow-up Idb1202579: Add special-characters-group-greekextended to RL module

Bug: T130535
Change-Id: I3e26d08a34283eaafe129dbef0944ea10c086162

8 years agosearch: getInterwikiResults returns array of SearchResultSets
Erik Bernhardson [Thu, 14 Apr 2016 16:04:12 +0000 (09:04 -0700)]
search: getInterwikiResults returns array of SearchResultSets

This function was incorrectly annotated. We can clearly see from the
code that uses it, such as in SpecialSearch, that this is an array of
SearchResultSet objects.

Bug: T132625
Change-Id: I4af07d3c9a9b08fd1fa438ddb6b781f78472b26c

8 years agomediawiki.page.ready: Load 'SearchInputWidget' too
Bartosz Dziewoński [Thu, 14 Apr 2016 16:03:08 +0000 (18:03 +0200)]
mediawiki.page.ready: Load 'SearchInputWidget' too

Bug: T132656
Change-Id: I66601ebad2e64f07536f1a3d77187a7c8ac5b524

8 years agoRemove unused import in WatchedItemStoreUnitTest
Leszek Manicki [Thu, 14 Apr 2016 15:28:44 +0000 (17:28 +0200)]
Remove unused import in WatchedItemStoreUnitTest

Change-Id: I56abf221e6e601ad0bceaae1a15eb8f1097f5baa

8 years agoMerge "Use WatchedItemStore for SP:RC watchers count"
jenkins-bot [Thu, 14 Apr 2016 14:38:23 +0000 (14:38 +0000)]
Merge "Use WatchedItemStore for SP:RC watchers count"

8 years agoMerge "CatWatch don't show the number of pages transcluded"
jenkins-bot [Thu, 14 Apr 2016 14:10:12 +0000 (14:10 +0000)]
Merge "CatWatch don't show the number of pages transcluded"

8 years agoUse WatchedItemStore for SP:RC watchers count
addshore [Thu, 14 Apr 2016 08:15:18 +0000 (09:15 +0100)]
Use WatchedItemStore for SP:RC watchers count

Bug: T132568
Change-Id: Ic6a0ee77cb767c6f8e4a8d359feb0405c9a990d1

8 years agoCatWatch don't show the number of pages transcluded
addshore [Sat, 2 Apr 2016 16:06:40 +0000 (19:06 +0300)]
CatWatch don't show the number of pages transcluded

Providing the perfectly correct number of pages
that have acctually been added to or removed from a
category is extermly hard.

Rather than providing data that is most likely wrong
and a bit useless ONLY provide a link to Special:WhatLinksHere.

This touches on the following bugs and may mean that
some of them don't need to be thought about any further.

Bug: T126855
Bug: T126407
Bug: T126139
Change-Id: Ida06d822d1955091595c17c9c6c2968a40a93bcd

8 years agoAllow description text caching for ForeignDBFile
Aaron Schulz [Wed, 13 Apr 2016 17:54:28 +0000 (10:54 -0700)]
Allow description text caching for ForeignDBFile

A large amount of real time is spent in fetching Commons
descriptions pages from wikipedias, according to xenon
flame graphs.

Change-Id: I3935bf8bf23da58b734f897d7a1979e9b2f7e5c8

8 years agoMerge "Add a rewind function to SearchResultSet"
jenkins-bot [Thu, 14 Apr 2016 00:00:18 +0000 (00:00 +0000)]
Merge "Add a rewind function to SearchResultSet"

8 years agoAdd a rewind function to SearchResultSet
Erik Bernhardson [Wed, 13 Apr 2016 19:21:54 +0000 (12:21 -0700)]
Add a rewind function to SearchResultSet

This is implemented in CirrusSearch so the result set can be looped
through multiple times. In general having a rewind function on any
iterator is probably a good idea, so pushing it into the upstream
interface.

Change-Id: Iaac9c11d8742288610011a2a0f6282944d35d5f3

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 13 Apr 2016 19:53:57 +0000 (21:53 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: If98c4a1a477e70076aa3ebf8e12a64b5b111cafc

8 years agoMerge "mediawiki.api: Log warning when requesting legacy token types"
jenkins-bot [Wed, 13 Apr 2016 19:51:27 +0000 (19:51 +0000)]
Merge "mediawiki.api: Log warning when requesting legacy token types"

8 years agoRevert "Hack IEUrlExtension::haveUndecodedRequestUri() to always return true"
Ori.livneh [Wed, 13 Apr 2016 19:49:39 +0000 (19:49 +0000)]
Revert "Hack IEUrlExtension::haveUndecodedRequestUri() to always return true"

This reverts commit 30c5c55bd28f2fe35867286b73100f42f829c448.

Change-Id: I219ae8db4f730f6ff19e395976ab08d7b9cfc50c

8 years agoHack IEUrlExtension::haveUndecodedRequestUri() to always return true
Ori Livneh [Wed, 13 Apr 2016 19:44:47 +0000 (12:44 -0700)]
Hack IEUrlExtension::haveUndecodedRequestUri() to always return true

Interacting badly with I1f108eb74. Will revert this shortly.

Change-Id: I58259aa7ccf00a07d19db6e6e23df48f0b78103c

8 years agomediawiki.api: Log warning when requesting legacy token types
Ricordisamoa [Tue, 15 Mar 2016 15:53:05 +0000 (16:53 +0100)]
mediawiki.api: Log warning when requesting legacy token types

Change-Id: Ia2c795a95b58f62f4687501a5537e5890d90144e

8 years agoMerge "Track which web request created a job"
jenkins-bot [Wed, 13 Apr 2016 18:06:38 +0000 (18:06 +0000)]
Merge "Track which web request created a job"

8 years agoTrack which web request created a job
Erik Bernhardson [Mon, 11 Apr 2016 21:00:43 +0000 (14:00 -0700)]
Track which web request created a job

We currently push a request id into structured logging (monolog/
logstash) to allow seeing all logs that were triggered by the same
request. This extends that to pass the id through jobs so jobs triggered
by a web request also share the same id and can be tracked together.
This web request id will follow jobs both directly created by a request,
and jobs created by those jobs.

This should give us some more visibility when debugging into what
started a particular job, and if a large number of jobs blowing up the
job queue are somehow related.

Change-Id: Iedbd031e6e9bb18fd6f7b923c8c305102255ab4b

8 years agoresourceloader: Implement modern module loading (2/2)
jdlrobson [Fri, 22 Jan 2016 19:29:28 +0000 (11:29 -0800)]
resourceloader: Implement modern module loading (2/2)

* Send 'module' and 'require' parameters to module closures.
  This depends on Ia925844cc22f143 being deployed one cycle earlier.
* Patch Moment and OOjs to ensure these libraries continue to expose
  their module as globals as well. AMD/UMD-compatible libraries
  only expose a global *OR* an export, not both. We need both
  for back-compat.
* Update pluralRuleParser to make use of module export to allow
  usage via require().

To test, check out the patch and run:
> mw.loader.load('moment');
> mw.loader.require('moment')()
> mw.loader.require('moment')('2011-04-01').fromNow()

Bug: T108655
Change-Id: Idbd054880ee70d659ec760aef8fcb38d0704a394

8 years agoMerge "Use english messages for background use of Status::getWikiText"
jenkins-bot [Wed, 13 Apr 2016 14:03:56 +0000 (14:03 +0000)]
Merge "Use english messages for background use of Status::getWikiText"

8 years agoSwitch to external HtmlFormatter
Max Semenik [Tue, 12 Apr 2016 20:20:20 +0000 (13:20 -0700)]
Switch to external HtmlFormatter

wikimedia/html-formatter is already present in mediawiki/vendor
as of 3954ca36ce3cbedc76c1763ad2694320c1327ce6.

Bug: T125001
Change-Id: Ie98096e5e3d325cde583bc66b21b8b41f2bba8b2

8 years agoMerge "Convert File::getDescriptionText() to getWithSetCallback()"
jenkins-bot [Wed, 13 Apr 2016 00:24:49 +0000 (00:24 +0000)]
Merge "Convert File::getDescriptionText() to getWithSetCallback()"

8 years agoTitle: Throw if newFromText is given an invalid value
Timo Tijhof [Wed, 4 Nov 2015 01:20:51 +0000 (01:20 +0000)]
Title: Throw if newFromText is given an invalid value

Follows-up 448c7ea03a372ded2f156bcbec, Ic85d27d.

* Removes the logger added in 448c7ea03a.
* Turn the warning into an exception. This was difficult previously
  because non-string values were common. However most of them were
  all null. Cases of other primitives (type object already throws)
  have been fixed.

Bug: T76305
Change-Id: I62fe3f700d94168ca35c833410171b1c48e6c4f3

8 years agoConvert File::getDescriptionText() to getWithSetCallback()
Aaron Schulz [Tue, 12 Apr 2016 23:21:52 +0000 (16:21 -0700)]
Convert File::getDescriptionText() to getWithSetCallback()

Change-Id: Ia27d6fc851598162367ad6e749feb6d76f2569bc

8 years agoMerge "OOjs UI: Apply texfield -> textfield typo fix on the library build"
jenkins-bot [Tue, 12 Apr 2016 23:14:05 +0000 (23:14 +0000)]
Merge "OOjs UI: Apply texfield -> textfield typo fix on the library build"

8 years agoOOjs UI: Apply texfield -> textfield typo fix on the library build
James D. Forrester [Tue, 12 Apr 2016 22:58:39 +0000 (15:58 -0700)]
OOjs UI: Apply texfield -> textfield typo fix on the library build

Broken in I7212e07, this was fixed in I7922121 which will be part of
OOjs UI v0.16.6 in a couple of weeks' time. For now, let's apply it
as a local patch to unbreak the Search form. Also, whoops.

Change-Id: Ie882ae6ee823d6cbcfc899e336c1170ef6f9f092

8 years agoMerge "Bump grunt to 1.0.1, remove grunt-cli"
jenkins-bot [Tue, 12 Apr 2016 22:52:21 +0000 (22:52 +0000)]
Merge "Bump grunt to 1.0.1, remove grunt-cli"

8 years agoMerge "More FSFile docs"
jenkins-bot [Tue, 12 Apr 2016 22:41:54 +0000 (22:41 +0000)]
Merge "More FSFile docs"

8 years agoMerge "filebackend: Make resyncFiles() easier to use"
jenkins-bot [Tue, 12 Apr 2016 21:28:06 +0000 (21:28 +0000)]
Merge "filebackend: Make resyncFiles() easier to use"

8 years agoMerge "virtualrest: Small doc fix"
jenkins-bot [Tue, 12 Apr 2016 21:22:26 +0000 (21:22 +0000)]
Merge "virtualrest: Small doc fix"

8 years agoMerge "Revert "Measure commitMasterChanges() run time""
jenkins-bot [Tue, 12 Apr 2016 21:18:56 +0000 (21:18 +0000)]
Merge "Revert "Measure commitMasterChanges() run time""

8 years agofilebackend: Make resyncFiles() easier to use
Aaron Schulz [Tue, 12 Apr 2016 10:29:52 +0000 (03:29 -0700)]
filebackend: Make resyncFiles() easier to use

Pass in the resync mode as a flag instead of using
the object instance.

Change-Id: I2da661a65afd712403db936b6e31fba8e8069096

8 years agoMore FSFile docs
Aaron Schulz [Tue, 5 Apr 2016 19:28:21 +0000 (12:28 -0700)]
More FSFile docs

Change-Id: I1ca3e0bc9d5db4ca043f313fb15a780ae102c50a

8 years agovirtualrest: Small doc fix
Aaron Schulz [Tue, 12 Apr 2016 20:53:36 +0000 (13:53 -0700)]
virtualrest: Small doc fix

Change-Id: Ie162eb88b4afc492b10c75f00b9725767e21ffeb

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 12 Apr 2016 20:15:08 +0000 (22:15 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I95fb9e364f3268eddab39b9abe4c68c62a1ec11a

8 years agoMerge "Don't report image cache hits / misses"
Ori Livneh [Tue, 12 Apr 2016 19:24:42 +0000 (19:24 +0000)]
Merge "Don't report image cache hits / misses"

8 years agoRevert "Measure commitMasterChanges() run time"
Ori.livneh [Tue, 12 Apr 2016 18:48:25 +0000 (18:48 +0000)]
Revert "Measure commitMasterChanges() run time"

This reverts commit efb441883937. This is the biggest metric
by statsd traffic volume on the Wikimedia cluster. Please re-introduce this
only with sampling.

Bug: T101141
Change-Id: I7bc3b3aaa98dcefe1a80a4f458a83232c29a27ea

8 years agoMerge "Do not validate relevant user name"
jenkins-bot [Tue, 12 Apr 2016 18:58:18 +0000 (18:58 +0000)]
Merge "Do not validate relevant user name"

8 years agoDon't report image cache hits / misses
Ori Livneh [Tue, 12 Apr 2016 18:30:21 +0000 (11:30 -0700)]
Don't report image cache hits / misses

This single metric is responsible for a substantial proportion of overall
statsd traffic on the Wikimedia cluster, per the task cited below. Nobody is
closely monitoring this statistic. We can reintroduce it with sampling at a
later date if it is deemed to be useful.

Bug: T101141
Change-Id: I6457cb91d527ce42c0918ac4e80613e6b59061ac

8 years agoUse english messages for background use of Status::getWikiText
umherirrender [Sun, 10 Apr 2016 12:12:43 +0000 (14:12 +0200)]
Use english messages for background use of Status::getWikiText

Status::getWikiText is used for internal logging, api error messages and
maintenance scripts. All this places are usually in english, so pass an
english language to getWikiText.

Change-Id: I3010fca8eb5740a3a851c55a8b12e171714c78f7