lhc/web/wiklou.git
7 years agoReciprocal language fallback for Upper/Lower Sorbian (hsb, dsb)
Federico Leva [Tue, 6 Dec 2016 22:32:05 +0000 (23:32 +0100)]
Reciprocal language fallback for Upper/Lower Sorbian (hsb, dsb)

The two are closely related and are estimated to be 86 % mutually
intelligible in written form.

https://translatewiki.net/wiki/Thread:Portal_talk:Hsb/Fallback_to_dsb
https://translatewiki.net/wiki/Thread:Portal_talk:Dsb/Fallback_to_hsb

The two locales already have identical $dateFormats and largely
overlapping $namespaceGenderAliases and translations of namespaces,
magic words and special pages (often they differ only for diacritics
and only about a dozen of them are defined in one but not the other).

All the users with some edits on dsb.wiki, hsb.wiki, hsb.wiktionary
(as listed by WikiStats) have been notified individually.

Change-Id: Ib806387c875c1bbef180f2b85eae45c050824cb7

7 years agoMerge "mediawiki.ui: Explicitly define input text color"
jenkins-bot [Tue, 27 Dec 2016 12:47:44 +0000 (12:47 +0000)]
Merge "mediawiki.ui: Explicitly define input text color"

7 years agoMerge "Edit stash: Simplify with postWithToken"
jenkins-bot [Tue, 27 Dec 2016 12:30:28 +0000 (12:30 +0000)]
Merge "Edit stash: Simplify with postWithToken"

7 years agoMerge "Adding white background color to thumbimages (i.e. framed images)"
jenkins-bot [Tue, 27 Dec 2016 12:02:14 +0000 (12:02 +0000)]
Merge "Adding white background color to thumbimages (i.e. framed images)"

7 years agoRemove incorrect deprecated notice from function WikiRevision::getText()
Subin Siby [Tue, 27 Dec 2016 06:57:06 +0000 (12:27 +0530)]
Remove incorrect deprecated notice from function WikiRevision::getText()

WikiRevision::getText() was wrongly marked deprecated in 1.21.
This has been fixed.

Bug: T152282
Bug: T61113
Change-Id: I3f0e0f7fe38bd4e2001efbe17cdba6bcc90b036f

7 years agomediawiki.ui: Explicitly define input text color
jo12bar [Mon, 26 Dec 2016 18:48:49 +0000 (10:48 -0800)]
mediawiki.ui: Explicitly define input text color

This fixes an issue where certain system themes (i.e. custom Gnome
themes) would set a default & often unreadable text color for any
.mw-ui-input's. The text color is now explicity set to
`@colorGray1`, fixing this issue.

Bug: T148457
Change-Id: I5b31fab317948d231bce5c242af65d6cc7d3f4aa

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 26 Dec 2016 21:05:43 +0000 (22:05 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I6ba2a0605d635d14f0ab659cd0931ecebffb91f2

7 years agoMerge "moved Exception classes from ContentHandler.php"
jenkins-bot [Mon, 26 Dec 2016 14:40:19 +0000 (14:40 +0000)]
Merge "moved Exception classes from ContentHandler.php"

7 years agomoved Exception classes from ContentHandler.php
mynk-96 [Sat, 24 Dec 2016 11:58:38 +0000 (17:28 +0530)]
moved Exception classes from ContentHandler.php

Bug: T153243
Change-Id: Ieb37b34e76441c5f68ec565c43421c50ac9be7e7

7 years agoReplace &$this with $this in MediaWiki/core hook system
divadsn [Sun, 25 Dec 2016 23:55:27 +0000 (23:55 +0000)]
Replace &$this with $this in MediaWiki/core hook system

Bug: T153505
Change-Id: Ie287adf8b1d384aa651c659a9d385877379a0f11

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 25 Dec 2016 21:02:13 +0000 (22:02 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I32d9a7aec18502403d80f5c48393c5d3abf6c5a9

7 years agoMerge "Add id attribute to error message "mw-error-cannotundelete""
jenkins-bot [Sun, 25 Dec 2016 19:17:20 +0000 (19:17 +0000)]
Merge "Add id attribute to error message "mw-error-cannotundelete""

7 years agoMerge "Fix rendering issues on RecentChanges Special page"
jenkins-bot [Sun, 25 Dec 2016 17:49:52 +0000 (17:49 +0000)]
Merge "Fix rendering issues on RecentChanges Special page"

7 years agoEdit stash: Simplify with postWithToken
Matt Russell [Mon, 27 Jun 2016 08:14:30 +0000 (18:14 +1000)]
Edit stash: Simplify with postWithToken

The original aborting issue in T102863 was fixed in 4a61bb8fb318.

Also moved early return to the top and added early return if the form is
missing, as well as moving code from the useless `onFormLoaded` function into
the main body.

Change-Id: Ie05d267f19ac2801754860fca1cec677167cd5d8

7 years agoMerge "Add populateInterwiki maintenance script"
jenkins-bot [Sun, 25 Dec 2016 11:13:30 +0000 (11:13 +0000)]
Merge "Add populateInterwiki maintenance script"

7 years agoAdd populateInterwiki maintenance script
aude [Thu, 28 Apr 2016 21:22:12 +0000 (17:22 -0400)]
Add populateInterwiki maintenance script

This has been in Wikibase since 2012, but is not at all
specific to Wikibase, and doesn't even require Wikibase
to be enabled.

Having this in core will make it available to more people
and without the hassle of having to clone Wikibase to
use the script.

Bug: T114577
Change-Id: Ib521a65e616bdc4b81206a084289cb4750f0d1f5

7 years agoMerge "Allow PHAN location to be read from PATH"
jenkins-bot [Sun, 25 Dec 2016 01:20:37 +0000 (01:20 +0000)]
Merge "Allow PHAN location to be read from PATH"

7 years agoMerge "Add missing properties to MailAddress class"
jenkins-bot [Sun, 25 Dec 2016 01:15:51 +0000 (01:15 +0000)]
Merge "Add missing properties to MailAddress class"

7 years agoAdd id attribute to error message "mw-error-cannotundelete"
divadsn [Fri, 23 Dec 2016 20:14:05 +0000 (20:14 +0000)]
Add id attribute to error message "mw-error-cannotundelete"

Bug: T20819
Change-Id: I65c241506d53ced2e714f3f6d431c2005263a1c0

7 years agoFix rendering issues on RecentChanges Special page
Phantom42 [Sat, 24 Dec 2016 22:23:23 +0000 (00:23 +0200)]
Fix rendering issues on RecentChanges Special page

Legend is rendered correctly now, fixed namespace checkboxes
behaviour, fixed styles of the changes list.

Bug: T112693
Change-Id: If2c5701587eee50a6d578459f6b38b6f16cd5fe9

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 24 Dec 2016 20:59:52 +0000 (21:59 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Iebe696fe47becb1a8171efb29ed59d2afc35b748

7 years agoAdding white background color to thumbimages (i.e. framed images)
Kaldari [Sat, 24 Dec 2016 06:08:57 +0000 (22:08 -0800)]
Adding white background color to thumbimages (i.e. framed images)

Bug: T154077
Change-Id: I96d2225a9cab05f5e427bdb6a5ee11198af34ff5

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 23 Dec 2016 21:00:18 +0000 (22:00 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: If0fcd4dfa00d5ef0d23155f66dddd7df8d563826

7 years agoAdd missing properties to MailAddress class
addshore [Fri, 23 Dec 2016 15:42:47 +0000 (15:42 +0000)]
Add missing properties to MailAddress class

Change-Id: I6f199cee22678391938637685a1a81771528eac4

7 years agoAllow PHAN location to be read from PATH
addshore [Fri, 23 Dec 2016 14:42:19 +0000 (14:42 +0000)]
Allow PHAN location to be read from PATH

Change-Id: I4ea64eab12f299a13559178c80fe6797d07a5f85

7 years agoRemove &$this usage
Subin Siby [Thu, 22 Dec 2016 10:31:10 +0000 (16:01 +0530)]
Remove &$this usage

Replaced &$this to avoid PHP 7.1 warning of passing $this by reference

Bug: T153505
Change-Id: I3e9bc59dc8cefac0108482afeb9cc9a274e2e54b

7 years agoMerge "Avoid pointless use of isset() in LBFactoryMulti()"
jenkins-bot [Fri, 23 Dec 2016 06:22:12 +0000 (06:22 +0000)]
Merge "Avoid pointless use of isset() in LBFactoryMulti()"

7 years agoRemove duplicate message movepage-max-pages
Brad Jorsch [Fri, 23 Dec 2016 03:55:45 +0000 (22:55 -0500)]
Remove duplicate message movepage-max-pages

Change-Id: I129a9b0e22236bd08daf7d9f7aaeb599a68b0108

7 years agoMerge "build: Karma proxy should convert Host header"
jenkins-bot [Fri, 23 Dec 2016 02:06:16 +0000 (02:06 +0000)]
Merge "build: Karma proxy should convert Host header"

7 years agobuild: Karma proxy should convert Host header
Antoine Musso [Tue, 20 Dec 2016 15:46:20 +0000 (16:46 +0100)]
build: Karma proxy should convert Host header

By default the Karma proxy does requests against 'localhost', however
if the target wiki server has strict host validation (e.g. multiple
virtual hosts or otherwise strictly verified) then requests may fail
since load.php is not found. An example is with MW_SERVER=devwiki.local.

MediaWiki-Vagrant and Wikimedia CI are not affected since they use
'localhost' as the virtual host.

Set Karma proxy to change the hostname accordingly.

Reference:
 https://github.com/karma-runner/karma/issues/1729
 https://github.com/karma-runner/karma/commit/ae05ea4

Bug: T153757
Change-Id: I317d5686aecd1fb6cf6921cdca77670cded85607

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 22 Dec 2016 20:54:42 +0000 (21:54 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I8f7e0aa4d80a56ad1526ca949310fe81495bf9bb

7 years agoMerge "Fix tests that don't check composer's autoloader"
jenkins-bot [Thu, 22 Dec 2016 18:20:14 +0000 (18:20 +0000)]
Merge "Fix tests that don't check composer's autoloader"

7 years agoMerge "Sync up with Parsoid parserTests."
jenkins-bot [Thu, 22 Dec 2016 17:56:27 +0000 (17:56 +0000)]
Merge "Sync up with Parsoid parserTests."

7 years agoSync up with Parsoid parserTests.
Subramanya Sastry [Thu, 22 Dec 2016 17:29:32 +0000 (11:29 -0600)]
Sync up with Parsoid parserTests.

This now aligns with Parsoid commit 471eb1031510e06a82a18007222396934b34264f

Change-Id: I676b656c9d45c73cfb4e8fdddd23d9c3c85845cd

7 years agoDon't parse language converter markup as a cell parameter in tables.
C. Scott Ananian [Tue, 13 Dec 2016 22:22:25 +0000 (17:22 -0500)]
Don't parse language converter markup as a cell parameter in tables.

Bug: T153140
Change-Id: I799363727162a0f337652b26bb69fe35c61a8553

7 years agoMerge "Align mw.widgets.DateInputWidget to OOjs UI's MediaWiki theme widgets"
jenkins-bot [Thu, 22 Dec 2016 13:49:57 +0000 (13:49 +0000)]
Merge "Align mw.widgets.DateInputWidget to OOjs UI's MediaWiki theme widgets"

7 years agoMerge "Special:RC filter: userExpLevel"
jenkins-bot [Thu, 22 Dec 2016 12:41:45 +0000 (12:41 +0000)]
Merge "Special:RC filter: userExpLevel"

7 years agoAlign mw.widgets.DateInputWidget to OOjs UI's MediaWiki theme widgets
Volker E [Fri, 28 Oct 2016 02:23:49 +0000 (19:23 -0700)]
Align mw.widgets.DateInputWidget to OOjs UI's MediaWiki theme widgets

Aligning mw.widgets.DateInputWidget to improved color palette and to
similar MediaWiki theme widgets. Removing distinction of theme specific
styles for now. Introducing transitions in several places to improve
user experience and changing CalendarWidget to `box-sizing: border-box`
to enable border on IE 8.

Bug: T149270
Change-Id: I6b5b99f444a02f68933c85ccd2b8898d3a8758bf

7 years agoFix tests that don't check composer's autoloader
Aleksey Bekh-Ivanov (WMDE) [Wed, 21 Dec 2016 15:06:57 +0000 (16:06 +0100)]
Fix tests that don't check composer's autoloader

Tests were failing if class cannot be loaded using `\AutoLoader` but can be loaded by composer's autoloader.

Change-Id: I005c9d99245f4733a9666c4bfe9e39baeaad3960

7 years agoMerge "Title: Fix subpage move error reporting"
jenkins-bot [Thu, 22 Dec 2016 09:54:07 +0000 (09:54 +0000)]
Merge "Title: Fix subpage move error reporting"

7 years agoMerge "Remove FileRepoStatus references"
jenkins-bot [Thu, 22 Dec 2016 05:58:04 +0000 (05:58 +0000)]
Merge "Remove FileRepoStatus references"

7 years agoMerge "Add a caught_by context field to exceptions"
jenkins-bot [Thu, 22 Dec 2016 05:50:27 +0000 (05:50 +0000)]
Merge "Add a caught_by context field to exceptions"

7 years agoAdd a caught_by context field to exceptions
Aaron Schulz [Thu, 22 Dec 2016 04:46:06 +0000 (20:46 -0800)]
Add a caught_by context field to exceptions

This distinguishes random errors caught and explicitly logged by various
callers from those that were only caught by the registered exception handler.
The later are likely to have more visibily impact on the user.

Change-Id: Icb4c4e9376270c5475c95cf40708a7ca3e4e0a49

7 years agoAvoid pointless use of isset() in LBFactoryMulti()
Aaron Schulz [Thu, 22 Dec 2016 03:10:04 +0000 (19:10 -0800)]
Avoid pointless use of isset() in LBFactoryMulti()

Change-Id: Ibaaa97a515f627860f6681f204aa1542b1639640

7 years agoMerge "Default block-cookies to 24 hours only"
jenkins-bot [Thu, 22 Dec 2016 02:22:40 +0000 (02:22 +0000)]
Merge "Default block-cookies to 24 hours only"

7 years agoDefault block-cookies to 24 hours only
Sam Wilson [Tue, 20 Dec 2016 12:08:38 +0000 (20:08 +0800)]
Default block-cookies to 24 hours only

Rather than use wgCookieExpiration as the basis for the maximum
life of a block cookie, just use 1 day.

Tests have been updated also.

Bug: T153347
Change-Id: I3447d97af3170308834f365c5c600430f47c66a7

7 years agoAllow HTML tags in LanguageConverter output.
C. Scott Ananian [Fri, 16 Dec 2016 18:41:51 +0000 (13:41 -0500)]
Allow HTML tags in LanguageConverter output.

A "remove HTML tags to avoid disrupting the layout" block is removed
(previously added in f16d1e4ed70cd5a8fa6ae6ca8bb71bfe62f4f47e).

This is a follow-up to I9b099273203482ffb570a5654d8ba50c833e526d.

Bug: T54192
Change-Id: I565fac58b3b0da7bfaedf64f5001c364f52e2244

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 21 Dec 2016 21:52:02 +0000 (22:52 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I418c1d6ebcf34623dad0fa52674d3c9d52928306

7 years agoMerge "Remove FSRepo"
jenkins-bot [Wed, 21 Dec 2016 19:32:37 +0000 (19:32 +0000)]
Merge "Remove FSRepo"

7 years agoRemove FSRepo
Reedy [Tue, 29 Nov 2016 23:34:47 +0000 (23:34 +0000)]
Remove FSRepo

Change-Id: Id6ca36cfa14077efc3d07fd5129ad9e4cc224e2c

7 years agoRemove FileRepoStatus references
Aaron Schulz [Wed, 21 Dec 2016 06:21:34 +0000 (22:21 -0800)]
Remove FileRepoStatus references

Change-Id: I03190273670f5c255423cf59019cbf12220c5498

7 years agoMerge "Work around &$this usage in SkinTemplate"
jenkins-bot [Wed, 21 Dec 2016 18:58:02 +0000 (18:58 +0000)]
Merge "Work around &$this usage in SkinTemplate"

7 years agoMerge "CoreParserFunctions: Use Title::inNamespace instead of manual comparison"
jenkins-bot [Wed, 21 Dec 2016 18:47:03 +0000 (18:47 +0000)]
Merge "CoreParserFunctions: Use Title::inNamespace instead of manual comparison"

7 years agoSpecial:RC filter: userExpLevel
Stephane Bisson [Tue, 15 Nov 2016 21:35:54 +0000 (16:35 -0500)]
Special:RC filter: userExpLevel

Allows filtering changes based on user
experience level. Supports the following
levels: 'newcomer', 'learner', 'experienced'

Will be used by the ERI project.

Bug: T149637
Change-Id: Ib2ac92925836ce2f3706d898968538aa18d14d5d

7 years agoMerge "Use FileBaseSiteLookup if $wgSitesCacheFile is set."
jenkins-bot [Wed, 21 Dec 2016 12:26:54 +0000 (12:26 +0000)]
Merge "Use FileBaseSiteLookup if $wgSitesCacheFile is set."

7 years agoCoreParserFunctions: Use Title::inNamespace instead of manual comparison
Niklas Laxström [Wed, 21 Dec 2016 09:54:33 +0000 (10:54 +0100)]
CoreParserFunctions: Use Title::inNamespace instead of manual comparison

Change-Id: I60c02bc68ef0d48b1dc66ba0961275feec5789fb

7 years agoMerge "wfMessage: use Message::params() to handle all the message parameters"
jenkins-bot [Wed, 21 Dec 2016 08:18:33 +0000 (08:18 +0000)]
Merge "wfMessage: use Message::params() to handle all the message parameters"

7 years agoMerge "mediawiki.api.watch: Remove the uselang parameter in POST"
jenkins-bot [Wed, 21 Dec 2016 08:06:09 +0000 (08:06 +0000)]
Merge "mediawiki.api.watch: Remove the uselang parameter in POST"

7 years agoMerge "Check for expiry dates in a 10-second window"
jenkins-bot [Wed, 21 Dec 2016 08:04:27 +0000 (08:04 +0000)]
Merge "Check for expiry dates in a 10-second window"

7 years agoMerge "Parser functions now format numbers according to page language (2nd attempt)"
Nikerabbit [Wed, 21 Dec 2016 07:58:25 +0000 (07:58 +0000)]
Merge "Parser functions now format numbers according to page language (2nd attempt)"

7 years agomediawiki.api.watch: Remove the uselang parameter in POST
Fomafix [Wed, 21 Dec 2016 07:21:28 +0000 (08:21 +0100)]
mediawiki.api.watch: Remove the uselang parameter in POST

Since 1f15d1d5828dfbc70d036a52da57460ea0e89175 the response does not contain
any user language specific messages anymore.

Change-Id: I525af200e3d1a48877438a997e78bb5fff297357

7 years agoMerge "Pin eslint version"
jenkins-bot [Wed, 21 Dec 2016 07:20:18 +0000 (07:20 +0000)]
Merge "Pin eslint version"

7 years agoMerge "Fixes and tests for ApiErrorFormatter ILocalizedException handling"
jenkins-bot [Wed, 21 Dec 2016 06:35:12 +0000 (06:35 +0000)]
Merge "Fixes and tests for ApiErrorFormatter ILocalizedException handling"

7 years agoMerge "Do not lose message parameters in UploadFromChunks::verifyChunk()"
jenkins-bot [Wed, 21 Dec 2016 05:59:36 +0000 (05:59 +0000)]
Merge "Do not lose message parameters in UploadFromChunks::verifyChunk()"

7 years agoMerge "ApiWatch: Set 'missing' to true, not 1"
jenkins-bot [Wed, 21 Dec 2016 05:35:33 +0000 (05:35 +0000)]
Merge "ApiWatch: Set 'missing' to true, not 1"

7 years agoMerge "ApiQueryWatchlist: Handle empty wltypes"
jenkins-bot [Wed, 21 Dec 2016 05:34:04 +0000 (05:34 +0000)]
Merge "ApiQueryWatchlist: Handle empty wltypes"

7 years agoCheck for expiry dates in a 10-second window
Sam Wilson [Tue, 20 Dec 2016 12:13:56 +0000 (20:13 +0800)]
Check for expiry dates in a 10-second window

This changes a test of expiry dates to be a 10-second range,
to account for slow testing. For example, a test may start and
set the block's expiry in one second, but by the time it is
reading the value from that block's cookie it can sometimes be
the next second. Making it 10 seconds just gives it more room
for being slow.

Bug: T153527
Change-Id: I5efde7785134a75487d31ef3d8b7b14f53b7f5d0

7 years agoMerge "API: Add action=validatepassword"
jenkins-bot [Wed, 21 Dec 2016 01:41:46 +0000 (01:41 +0000)]
Merge "API: Add action=validatepassword"

7 years agoMerge "ApiTag: Return 'noop' as a boolean in formatversion=2"
jenkins-bot [Wed, 21 Dec 2016 01:37:38 +0000 (01:37 +0000)]
Merge "ApiTag: Return 'noop' as a boolean in formatversion=2"

7 years agoMerge "ApiMove: Fix fatal when attempting to move to a namespace with no talkpages"
jenkins-bot [Wed, 21 Dec 2016 00:58:03 +0000 (00:58 +0000)]
Merge "ApiMove: Fix fatal when attempting to move to a namespace with no talkpages"

7 years agoPin eslint version
Paladox [Sun, 18 Dec 2016 16:29:41 +0000 (16:29 +0000)]
Pin eslint version

We don't want tests failing every time upstream publishing a new
version.

Instead we should bump this manually everytime they update to make sure
no failures happen.

Bug: T118941
Change-Id: I1c76dacd0950100825b85a3791f74c1f6d5477d9

7 years agoWork around &$this usage in SkinTemplate
Geoffrey Mon [Wed, 21 Dec 2016 00:39:07 +0000 (19:39 -0500)]
Work around &$this usage in SkinTemplate

Using &$this triggers warnings with PHP 7.1.

Bug: T153505
Change-Id: I7798b08a356c64796c9aea1273eef88f8678f8d4

7 years agoDo not lose message parameters in UploadFromChunks::verifyChunk()
Matthias Mullie [Thu, 15 Dec 2016 13:34:13 +0000 (14:34 +0100)]
Do not lose message parameters in UploadFromChunks::verifyChunk()

This change is similar to If9ce05045ada1e3f55e031639e4c4ebc2a216de8

Having verifyChunk inside doStashFile was annoying. We'd have to
catch the exception in UploadBase::tryStashFile in order to convert
it to a proper Status object instead of the generic one that is
currently built there.
I felt like UploadBase::tryStashFile shouldn't have to be aware of
this exception, so I moved that catch into a new
UploadFromChunks::tryStashFile.
It makes no sense to perform that check twice when running
tryStashFile, so I got rid of it in doStashFile. But that also
meant we had to add it to a few other (now deprecated) places calling
doStashFile... But they should be cleaned up at some point anyway.

This will make sure we get error output like this:
"code":"filetype-bad-ie-mime",
"key":"filetype-bad-ie-mime",
"params":["text/html"]

instead of:
"code":"stashfailed",
"key":"Cannot upload this file because Internet Explorer would detect it as \"text/html\", which is a disallowed and potentially dangerous file type.",
"params":[]

Bug: T32095
Change-Id: I2fa767656cb3a5b366210042b8b504dc10ddaf68

7 years agoMerge "upload: Avoid &$this in hooks"
jenkins-bot [Tue, 20 Dec 2016 23:36:15 +0000 (23:36 +0000)]
Merge "upload: Avoid &$this in hooks"

7 years agoupload: Avoid &$this in hooks
rlot [Tue, 20 Dec 2016 15:49:15 +0000 (16:49 +0100)]
upload: Avoid &$this in hooks

&$this triggers warnings in PHP 7.1. Simply renaming the variable before
passing it by reference avoids the warning, without breaking backwards
compatibility.

Bug: T153505
Change-Id: I78ea04a01ecce82294837e92c2a05b00ffb6e0f6

7 years agoProtect -{...}- variant constructs in galleries
C. Scott Ananian [Wed, 21 Sep 2016 18:25:26 +0000 (14:25 -0400)]
Protect -{...}- variant constructs in galleries

This also protects naked external links, which are internally surrounded by
`-{R|...}-` by LanguageConverter::markNoConversion.

Originally found in failed tests in I7fa2d85d6.

Bug: T54190
Change-Id: I9b099273203482ffb570a5654d8ba50c833e526d

7 years agoProtect -{...}- variant constructs in images.
C. Scott Ananian [Tue, 13 Dec 2016 19:49:36 +0000 (14:49 -0500)]
Protect -{...}- variant constructs in images.

A protected version of explode is factored out as
`StringUtils::delimiterExplode`, since it will be used in follow-up
patches in this series.  The `delimiterExplode` implementation creates
an intermediate array of the exploded results, which is reasonable as
the number of image options is small; but since an Iterator is
returned the implementation can be upgraded in the future (at the cost
of additional complexity) to avoid this.  The additional code in that
case would be similar to ExplodeIterator.

Bug: T146305
Change-Id: I1327685e9e8c07ef476dceaa6f6dae4ba40989ef

7 years agoUse FileBaseSiteLookup if $wgSitesCacheFile is set.
daniel [Tue, 20 Dec 2016 20:14:41 +0000 (21:14 +0100)]
Use FileBaseSiteLookup if $wgSitesCacheFile is set.

Change-Id: I150011d6d2f596fb4edb9b52ed09ef2951ce6d1e

7 years agoApiQueryWatchlist: Handle empty wltypes
Brad Jorsch [Tue, 20 Dec 2016 19:40:03 +0000 (14:40 -0500)]
ApiQueryWatchlist: Handle empty wltypes

The pre-WatchedItemQueryService code used ApiQueyrBase::addWhereFld()
which filters out empty arrays. WatchedItemQueryService doesn't do that.

Bug: T153733
Change-Id: I3416b5a05c9751303b5c28a8b6d9cb746a101f73

7 years agoApiWatch: Set 'missing' to true, not 1
Brad Jorsch [Tue, 20 Dec 2016 19:34:15 +0000 (14:34 -0500)]
ApiWatch: Set 'missing' to true, not 1

Bug: T153775
Change-Id: I2b45cc7f64623f10d86e37dd2cbf2516f78ae7e6

7 years agoFixes and tests for ApiErrorFormatter ILocalizedException handling
Brad Jorsch [Tue, 20 Dec 2016 18:59:05 +0000 (13:59 -0500)]
Fixes and tests for ApiErrorFormatter ILocalizedException handling

Change-Id: I9449ea5886e27dfb9e54b91cdb50a6a6a2c9a4ed

7 years agowfMessage: use Message::params() to handle all the message parameters
Zhuyifei1999 [Tue, 20 Dec 2016 14:05:03 +0000 (14:05 +0000)]
wfMessage: use Message::params() to handle all the message parameters

The old code was similar to Message::params(), but Message::params()
was unable to handle "special" parameters and received an overhaul
in 7f2663f, yet wfMessage remained broken. To avoid duplication,
wfMessage shall call Message::params() to correctly handle these
parameters.

CategoryMembershipChange::getChangeMessageText and its caller has
been updated so as not to take advantage of this bug.

Bug: T153747
Change-Id: I6667acf7e71c9db07fefc9fbb741c160e15823ff

7 years agoMerge "Pass undone revision id to PageContentSaveComplete hook"
jenkins-bot [Tue, 20 Dec 2016 19:01:07 +0000 (19:01 +0000)]
Merge "Pass undone revision id to PageContentSaveComplete hook"

7 years agoApiTag: Return 'noop' as a boolean in formatversion=2
Brad Jorsch [Tue, 20 Dec 2016 18:52:19 +0000 (13:52 -0500)]
ApiTag: Return 'noop' as a boolean in formatversion=2

Bug: T153704
Change-Id: I1d8059e5e0ede6ba11449ecb4de5a482ddc8d2e4

7 years agoTitle: Fix subpage move error reporting
Brad Jorsch [Mon, 19 Dec 2016 19:03:52 +0000 (14:03 -0500)]
Title: Fix subpage move error reporting

Title::moveSubpages() sometimes returns a single message-specifier array
and sometimes returns an array of such arrays. This is extremely
difficult for a caller to deal with. Since nothing in Gerrit other than
ApiMove calls this, let's just fix it.

Also, it seems that messages were never created for the errors returned
by this method. So let's create them.

Change-Id: I4e55483c4476a1bb96c87266a4661871776fbf9b

7 years agoUpdate date format for Wu language
MarcoAurelio [Fri, 9 Dec 2016 10:21:34 +0000 (11:21 +0100)]
Update date format for Wu language

Bug: T125047
Change-Id: I398d93d372ad0d5345b0e4b27657ad69b0079d94

7 years agoAPI: Add action=validatepassword
Brad Jorsch [Thu, 1 Dec 2016 22:29:29 +0000 (17:29 -0500)]
API: Add action=validatepassword

This will allow for checking passwords against the wiki's password
policy from the account creation and password change forms.

Bug: T111303
Change-Id: I0de281483bd83e47d80aa1ea37149d14f2ae5ebd

7 years agoMerge "Fix RevDel API output for formatversion=2"
jenkins-bot [Mon, 19 Dec 2016 23:06:49 +0000 (23:06 +0000)]
Merge "Fix RevDel API output for formatversion=2"

7 years agoMerge "ApiEditPage: Avoid PHP warning"
jenkins-bot [Mon, 19 Dec 2016 23:04:47 +0000 (23:04 +0000)]
Merge "ApiEditPage: Avoid PHP warning"

7 years agoMerge "Remove unused Phan exception"
jenkins-bot [Mon, 19 Dec 2016 21:31:03 +0000 (21:31 +0000)]
Merge "Remove unused Phan exception"

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 19 Dec 2016 20:56:18 +0000 (21:56 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I905f195a2d4a159bf4f9cb3357465ce96c59f2ce

7 years agoApiMove: Fix fatal when attempting to move to a namespace with no talkpages
Brad Jorsch [Mon, 19 Dec 2016 19:02:43 +0000 (14:02 -0500)]
ApiMove: Fix fatal when attempting to move to a namespace with no talkpages

The move will probably error out anyway, but we want it to do so
properly instead of by throwing a PHP fatal.

Bug: T153693
Change-Id: I19334a28a3f539e0f3d3866353093711f68786ee

7 years agoDo not exit the run method in case of a missing rev
David Causse [Mon, 19 Dec 2016 17:37:01 +0000 (18:37 +0100)]
Do not exit the run method in case of a missing rev

We should ignore broken/missing titles and not stop the whole process.

Change-Id: Ib4acb739c28c5f3278430b43b6304af3a513085e

7 years agoFix RevDel API output for formatversion=2
Brad Jorsch [Mon, 19 Dec 2016 16:36:09 +0000 (11:36 -0500)]
Fix RevDel API output for formatversion=2

Use booleans, not the old empty-string-or-undefined.

This bugfix is a breaking change, but chances are it won't affect many
clients.

Bug: T153518
Change-Id: If5fa2cdcb973b186349307b29e4266daceef0a9d

7 years agoPass undone revision id to PageContentSaveComplete hook
cenarium [Sun, 18 Dec 2016 02:06:42 +0000 (03:06 +0100)]
Pass undone revision id to PageContentSaveComplete hook

This passes the id of the revision that was undone to the
PageContentSaveComplete hook, since this hook is now inside a deferred
update so extensions can no longer rely on 'wpUndidRevision' being
present in the request.

Change-Id: I50dcb841cd0616acc2d69c3a685ba3cb339986c3

7 years agoApiEditPage: Avoid PHP warning
Brad Jorsch [Mon, 19 Dec 2016 14:49:59 +0000 (09:49 -0500)]
ApiEditPage: Avoid PHP warning

In cases where $result is non-null but doesn't have the 'spam' key,
constructing the fallback array was raising a PHP warning.

Thinking it over, we should just use a switch instead of making an array
of known fallback messages. It's longer source code, but probably less
real work than constructing an array where only one entry will actually
be used.

Bug: T153590
Change-Id: I50349c56692c4b2f9a8e560a849c36db1082120e

7 years agoParser functions now format numbers according to page language (2nd attempt)
Nikerabbit [Thu, 3 Nov 2016 07:57:48 +0000 (07:57 +0000)]
Parser functions now format numbers according to page language (2nd attempt)

Bug: T62604
Change-Id: I1c60d828891b82a8122e7030d843018fccaf72e4

7 years agoMerge "build: Update phpunit to 4.8.31"
jenkins-bot [Sun, 18 Dec 2016 23:07:03 +0000 (23:07 +0000)]
Merge "build: Update phpunit to 4.8.31"

7 years agoMerge "Move the Ukrainian grammar rules from PHP and JS to JSON"
jenkins-bot [Sun, 18 Dec 2016 23:04:48 +0000 (23:04 +0000)]
Merge "Move the Ukrainian grammar rules from PHP and JS to JSON"

7 years agobuild: Update phpunit to 4.8.31
Paladox [Tue, 31 May 2016 14:34:00 +0000 (15:34 +0100)]
build: Update phpunit to 4.8.31

Please see changelog at
https://github.com/sebastianbergmann/phpunit/blob/4.8/ChangeLog-4.8.md

Change-Id: I00e0b94452b371cacecc4eb10330749c0da1890e