awu42 [Fri, 30 Dec 2016 16:55:28 +0000 (11:55 -0500)]
Replaced &$this with $this
Replaced &$this in includes/Title.php to avoid error in PHP 7.1
Bug: T153505
Change-Id: I76eaae609a817af42687d87bcf0d13da7ba01c05
jenkins-bot [Fri, 30 Dec 2016 15:47:39 +0000 (15:47 +0000)]
Merge "Make SpecialPage::getLinkRenderer() public"
Fomafix [Fri, 30 Dec 2016 15:01:03 +0000 (16:01 +0100)]
Add ->text() to prevent double HTML escaping
wfMessage() without ->text() makes an automatic HTML escaping.
Html::element() makes also a HTML escaping of the content.
This leads to a double escaping and raw HTML in shown on the rendered page.
Change-Id: I68165492c828837f842e7885f557644ca1bb0a8c
Translation updater bot [Fri, 30 Dec 2016 09:03:31 +0000 (10:03 +0100)]
Localisation updates from https://translatewiki.net.
Change-Id: I93d8f62640eb192034ac0caf523f1efa820caefe
Amire80 [Fri, 30 Dec 2016 06:46:56 +0000 (08:46 +0200)]
Change the punctuation of apierror-baddiff
A comma implies that one of three different things happened.
A full stop makes it clear that one thing happened, and one of
the two reasons in the next sentence was the reason for it.
Change-Id: I79aa8222dd0f6f1af74bc2017c4e058a559ef719
jenkins-bot [Thu, 29 Dec 2016 20:38:26 +0000 (20:38 +0000)]
Merge "Database: Avoid internal use of ignoreErrors()"
Translation updater bot [Thu, 29 Dec 2016 08:47:32 +0000 (09:47 +0100)]
Localisation updates from https://translatewiki.net.
Change-Id: I09da6dbd70b11f52646813bd78e2e42ab61706cb
jenkins-bot [Wed, 28 Dec 2016 21:30:23 +0000 (21:30 +0000)]
Merge "Replace some usages of &$this in hook parameters"
Victor Barbu [Sun, 25 Dec 2016 19:32:22 +0000 (21:32 +0200)]
Replace some usages of &$this in hook parameters
Affected classes:
- ApiBase
- ApiPageSet
- HistoryPager
- RawAction
Bug: T153505
Change-Id: I0862476a39a1c3206a84f79c1b8f7db41bc47959
jenkins-bot [Wed, 28 Dec 2016 10:26:04 +0000 (10:26 +0000)]
Merge "Add release notes for recent language fallback additions"
Translation updater bot [Wed, 28 Dec 2016 09:19:21 +0000 (10:19 +0100)]
Localisation updates from https://translatewiki.net.
Change-Id: Ic17ad3e58b95bee1275374e01d1e3dead7662320
Federico Leva [Wed, 28 Dec 2016 08:19:55 +0000 (09:19 +0100)]
Add release notes for recent language fallback additions
Change-Id: Iead6f9160eb19b413104f65bbb9f23b4e65d9865
jenkins-bot [Wed, 28 Dec 2016 07:47:35 +0000 (07:47 +0000)]
Merge "EditPage: Avoid use of &$this in hooks"
Justin Du [Tue, 27 Dec 2016 14:36:04 +0000 (08:36 -0600)]
EditPage: Avoid use of &$this in hooks
* This triggers warnings in PHP 7.1
Bug: T153505
Change-Id: I5324a6bfe9e8ed255975104c5de7e7a7011cb741
Federico Leva [Thu, 1 Dec 2016 13:13:06 +0000 (14:13 +0100)]
Fallback io (Ido) to eo (Esperanto)
Ido is a variant of Esperanto and all its speakers are supposed
to also know Esperanto. Either way, all translators were notified.
https://translatewiki.net/wiki/Thread:Portal_talk:Ido/Use_Esperanto_when_no_translation
From eo, io will inherit the date format, usage of space as digit separator
(consistent with most European languages), hundreds of translations for
magic words and special pages. The namespace gender alias for eo is adapted
to match the io format.
All the io.wiki and io.wiktionary users as listed by WikiStats have been
notified of the discussion individually.
Change-Id: Ia85d2e4b007b523027891bf2c2bccde55916510c
Federico Leva [Tue, 6 Dec 2016 22:35:55 +0000 (23:35 +0100)]
Language fallback from Pontic (pnt) to Greek (el)
The (relative) majority of speakers is estimated to live in Greece
and know Greek; for the others, intelligibility seems assured.
The language fallback was probably forgotten for a mere oversight.
https://translatewiki.net/wiki/Thread:Portal_talk:Pnt/Use_Greek_when_no_translation
In addition to the discussion between translators, every pnt.wiki
user has been alerted individually.
From el, pnt will inherit hundreds of translations for magic words,
namespaces and special page names. $linkTrail, $separatorTransformTable
and $fallback8bitEncoding are currently defined in el but not pnt.
The "ISO 8601" date format will also change definition, but the default
date format is "pnt" which is defined only for pnt.
Change-Id: I0377fff9300a8314cb9172f3be710be5dbce6825
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
jenkins-bot [Tue, 27 Dec 2016 12:47:44 +0000 (12:47 +0000)]
Merge "mediawiki.ui: Explicitly define input text color"
jenkins-bot [Tue, 27 Dec 2016 12:30:28 +0000 (12:30 +0000)]
Merge "Edit stash: Simplify with postWithToken"
jenkins-bot [Tue, 27 Dec 2016 12:02:14 +0000 (12:02 +0000)]
Merge "Adding white background color to thumbimages (i.e. framed images)"
Kevin Israel [Tue, 27 Dec 2016 10:20:30 +0000 (05:20 -0500)]
Database: Avoid internal use of ignoreErrors()
* Use $tempIgnore in DatabaseBase::tableExists() instead of ignoreErrors().
* DatabasePostgres::reportQueryError(), since
419221e4a71b, calls
ignoreErrors() before and after rollback(). This is probably not effective
as a recursion guard (reportQueryError() would be called regardless), and
for suppressing any log entry or exception, it is redundant (doRollback()
already sets $tempIgnore when calling query()).
* ignoreErrors(), now unused, can be removed in a separate change set.
Change-Id: Iee768abf996ece213146ab8f64a15a2b407a2e5e
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
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
Translation updater bot [Mon, 26 Dec 2016 21:05:43 +0000 (22:05 +0100)]
Localisation updates from https://translatewiki.net.
Change-Id: I6ba2a0605d635d14f0ab659cd0931ecebffb91f2
jenkins-bot [Mon, 26 Dec 2016 14:40:19 +0000 (14:40 +0000)]
Merge "moved 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
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
Translation updater bot [Sun, 25 Dec 2016 21:02:13 +0000 (22:02 +0100)]
Localisation updates from https://translatewiki.net.
Change-Id: I32d9a7aec18502403d80f5c48393c5d3abf6c5a9
jenkins-bot [Sun, 25 Dec 2016 19:17:20 +0000 (19:17 +0000)]
Merge "Add id attribute to error message "mw-error-cannotundelete""
jenkins-bot [Sun, 25 Dec 2016 17:49:52 +0000 (17:49 +0000)]
Merge "Fix rendering issues on RecentChanges Special page"
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
jenkins-bot [Sun, 25 Dec 2016 11:13:30 +0000 (11:13 +0000)]
Merge "Add 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
jenkins-bot [Sun, 25 Dec 2016 01:20:37 +0000 (01:20 +0000)]
Merge "Allow PHAN location to be read from PATH"
jenkins-bot [Sun, 25 Dec 2016 01:15:51 +0000 (01:15 +0000)]
Merge "Add missing properties to MailAddress class"
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
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
Translation updater bot [Sat, 24 Dec 2016 20:59:52 +0000 (21:59 +0100)]
Localisation updates from https://translatewiki.net.
Change-Id: Iebe696fe47becb1a8171efb29ed59d2afc35b748
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
Kunal Mehta [Sat, 24 Dec 2016 01:14:05 +0000 (17:14 -0800)]
Make SpecialPage::getLinkRenderer() public
This makes it easier to be dependency injected and used in areas that
get SpecialPage instances like hooks.
Change-Id: I5cf823695cdc18c5dd9390244af5f3c6bc4f63c0
Translation updater bot [Fri, 23 Dec 2016 21:00:18 +0000 (22:00 +0100)]
Localisation updates from https://translatewiki.net.
Change-Id: If0fcd4dfa00d5ef0d23155f66dddd7df8d563826
addshore [Fri, 23 Dec 2016 15:42:47 +0000 (15:42 +0000)]
Add missing properties to MailAddress class
Change-Id: I6f199cee22678391938637685a1a81771528eac4
addshore [Fri, 23 Dec 2016 14:42:19 +0000 (14:42 +0000)]
Allow PHAN location to be read from PATH
Change-Id: I4ea64eab12f299a13559178c80fe6797d07a5f85
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
jenkins-bot [Fri, 23 Dec 2016 06:22:12 +0000 (06:22 +0000)]
Merge "Avoid pointless use of isset() in LBFactoryMulti()"
Brad Jorsch [Fri, 23 Dec 2016 03:55:45 +0000 (22:55 -0500)]
Remove duplicate message movepage-max-pages
Change-Id: I129a9b0e22236bd08daf7d9f7aaeb599a68b0108
jenkins-bot [Fri, 23 Dec 2016 02:06:16 +0000 (02:06 +0000)]
Merge "build: 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
Translation updater bot [Thu, 22 Dec 2016 20:54:42 +0000 (21:54 +0100)]
Localisation updates from https://translatewiki.net.
Change-Id: I8f7e0aa4d80a56ad1526ca949310fe81495bf9bb
jenkins-bot [Thu, 22 Dec 2016 18:20:14 +0000 (18:20 +0000)]
Merge "Fix tests that don't check composer's autoloader"
jenkins-bot [Thu, 22 Dec 2016 17:56:27 +0000 (17:56 +0000)]
Merge "Sync 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
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
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"
jenkins-bot [Thu, 22 Dec 2016 12:41:45 +0000 (12:41 +0000)]
Merge "Special:RC filter: userExpLevel"
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
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
jenkins-bot [Thu, 22 Dec 2016 09:54:07 +0000 (09:54 +0000)]
Merge "Title: Fix subpage move error reporting"
jenkins-bot [Thu, 22 Dec 2016 05:58:04 +0000 (05:58 +0000)]
Merge "Remove FileRepoStatus references"
jenkins-bot [Thu, 22 Dec 2016 05:50:27 +0000 (05:50 +0000)]
Merge "Add 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
Aaron Schulz [Thu, 22 Dec 2016 03:10:04 +0000 (19:10 -0800)]
Avoid pointless use of isset() in LBFactoryMulti()
Change-Id: Ibaaa97a515f627860f6681f204aa1542b1639640
jenkins-bot [Thu, 22 Dec 2016 02:22:40 +0000 (02:22 +0000)]
Merge "Default 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
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
Translation updater bot [Wed, 21 Dec 2016 21:52:02 +0000 (22:52 +0100)]
Localisation updates from https://translatewiki.net.
Change-Id: I418c1d6ebcf34623dad0fa52674d3c9d52928306
jenkins-bot [Wed, 21 Dec 2016 19:32:37 +0000 (19:32 +0000)]
Merge "Remove FSRepo"
Reedy [Tue, 29 Nov 2016 23:34:47 +0000 (23:34 +0000)]
Remove FSRepo
Change-Id: Id6ca36cfa14077efc3d07fd5129ad9e4cc224e2c
Aaron Schulz [Wed, 21 Dec 2016 06:21:34 +0000 (22:21 -0800)]
Remove FileRepoStatus references
Change-Id: I03190273670f5c255423cf59019cbf12220c5498
jenkins-bot [Wed, 21 Dec 2016 18:58:02 +0000 (18:58 +0000)]
Merge "Work around &$this usage in SkinTemplate"
jenkins-bot [Wed, 21 Dec 2016 18:47:03 +0000 (18:47 +0000)]
Merge "CoreParserFunctions: Use Title::inNamespace instead of manual comparison"
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
jenkins-bot [Wed, 21 Dec 2016 12:26:54 +0000 (12:26 +0000)]
Merge "Use FileBaseSiteLookup if $wgSitesCacheFile is set."
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
jenkins-bot [Wed, 21 Dec 2016 08:18:33 +0000 (08:18 +0000)]
Merge "wfMessage: use Message::params() to handle all the message parameters"
jenkins-bot [Wed, 21 Dec 2016 08:06:09 +0000 (08:06 +0000)]
Merge "mediawiki.api.watch: Remove the uselang parameter in POST"
jenkins-bot [Wed, 21 Dec 2016 08:04:27 +0000 (08:04 +0000)]
Merge "Check for expiry dates in a 10-second window"
Nikerabbit [Wed, 21 Dec 2016 07:58:25 +0000 (07:58 +0000)]
Merge "Parser functions now format numbers according to page language (2nd attempt)"
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
jenkins-bot [Wed, 21 Dec 2016 07:20:18 +0000 (07:20 +0000)]
Merge "Pin eslint version"
jenkins-bot [Wed, 21 Dec 2016 06:35:12 +0000 (06:35 +0000)]
Merge "Fixes and tests for ApiErrorFormatter ILocalizedException handling"
jenkins-bot [Wed, 21 Dec 2016 05:59:36 +0000 (05:59 +0000)]
Merge "Do not lose message parameters in UploadFromChunks::verifyChunk()"
jenkins-bot [Wed, 21 Dec 2016 05:35:33 +0000 (05:35 +0000)]
Merge "ApiWatch: Set 'missing' to true, not 1"
jenkins-bot [Wed, 21 Dec 2016 05:34:04 +0000 (05:34 +0000)]
Merge "ApiQueryWatchlist: Handle empty wltypes"
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
jenkins-bot [Wed, 21 Dec 2016 01:41:46 +0000 (01:41 +0000)]
Merge "API: Add action=validatepassword"
jenkins-bot [Wed, 21 Dec 2016 01:37:38 +0000 (01:37 +0000)]
Merge "ApiTag: Return 'noop' as a boolean in formatversion=2"
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"
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
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
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
jenkins-bot [Tue, 20 Dec 2016 23:36:15 +0000 (23:36 +0000)]
Merge "upload: 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
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
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
daniel [Tue, 20 Dec 2016 20:14:41 +0000 (21:14 +0100)]
Use FileBaseSiteLookup if $wgSitesCacheFile is set.
Change-Id: I150011d6d2f596fb4edb9b52ed09ef2951ce6d1e
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
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
Brad Jorsch [Tue, 20 Dec 2016 18:59:05 +0000 (13:59 -0500)]
Fixes and tests for ApiErrorFormatter ILocalizedException handling
Change-Id: I9449ea5886e27dfb9e54b91cdb50a6a6a2c9a4ed
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