lhc/web/wiklou.git
5 years agoUse LogPage::validTypes() instead of $wgLogTypes in a few places
Kunal Mehta [Wed, 25 Jul 2018 23:40:47 +0000 (16:40 -0700)]
Use LogPage::validTypes() instead of $wgLogTypes in a few places

This is preparation for T200385, which will add a hook to modify the
list of known log types, which will bypass the global variable.

Change-Id: I763cf8b71a98d1dba5f9964fc8d919a268c5d8a5

5 years agoEnclose compact() call in error suppression
Max Semenik [Sat, 28 Jul 2018 03:13:57 +0000 (20:13 -0700)]
Enclose compact() call in error suppression

In PHP 7.3, compact() now emits warnings when a variable doesn't exist.
Because our language files aren't required to contain all the possible
variables, this results in massive spam trying to run tests.

Change-Id: Idab0340ec1cdebfca67cb448e350a408438bcbbc

5 years agoAPI: Update query modules for MCR
Brad Jorsch [Fri, 16 Feb 2018 18:23:45 +0000 (13:23 -0500)]
API: Update query modules for MCR

MCR deprecated the Revision class in favor of the broadly similar
RevisionRecord, and more interestingly added the concept of multiple
content "slots" to revisions.

Thus, prop=revisions, prop=deletedrevisions, and so on gain a parameter
to specify which slots are wanted. When this new parameter is not
specified (and any content-related props are specified), a warning about
the legacy format will be issued.

The rest of the modules just needed to call methods or use constants on
RevisionRecord instead of Revision. ApiQueryDeletedrevs wasn't touched,
since it has been deprecated since 1.25 anyway.

This also updates a few non-query modules that don't depend on details
of editing, diffing, or viewing MCR revisions that haven't been figured
out yet.

Bug: T200568
Change-Id: I1327d1784f5cedb006cd74df834cf9a560a77a5d

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 27 Jul 2018 19:54:02 +0000 (21:54 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ibec891ce84ce50657b8b3486f5be27629e6404f5

5 years agoMerge "Remove two unused OutputPage methods"
jenkins-bot [Fri, 27 Jul 2018 18:33:44 +0000 (18:33 +0000)]
Merge "Remove two unused OutputPage methods"

5 years agoMerge "Disallow empty paths in LockManager"
jenkins-bot [Fri, 27 Jul 2018 10:04:02 +0000 (10:04 +0000)]
Merge "Disallow empty paths in LockManager"

5 years agoMerge "Correct recent schema changes for MSSQL, Oracle"
jenkins-bot [Fri, 27 Jul 2018 08:30:49 +0000 (08:30 +0000)]
Merge "Correct recent schema changes for MSSQL, Oracle"

5 years agoMerge "Fix test database prefix in ParserTestTopLevelSuite"
jenkins-bot [Fri, 27 Jul 2018 06:53:16 +0000 (06:53 +0000)]
Merge "Fix test database prefix in ParserTestTopLevelSuite"

5 years agoAdd explanation about JS editing changes to permission error
Gergő Tisza [Mon, 23 Jul 2018 17:55:08 +0000 (19:55 +0200)]
Add explanation about JS editing changes to permission error

This does not handle the error message when viewing a non-existent
page (noarticletext-nopermission), but that seems complicated to
get right.

Change-Id: Ia4e798b9a646908bd84fec5a53db929040e61aa7

5 years agoMerge "HistoryAction: Implement HistoryPageToolLinks hook for adding more links"
jenkins-bot [Thu, 26 Jul 2018 23:20:35 +0000 (23:20 +0000)]
Merge "HistoryAction: Implement HistoryPageToolLinks hook for adding more links"

5 years agoMerge "Check for right-* messages as a structure test"
jenkins-bot [Thu, 26 Jul 2018 22:34:00 +0000 (22:34 +0000)]
Merge "Check for right-* messages as a structure test"

5 years agoMerge "Segregate right to edit sitewide CSS/JS"
jenkins-bot [Thu, 26 Jul 2018 22:26:11 +0000 (22:26 +0000)]
Merge "Segregate right to edit sitewide CSS/JS"

5 years agoMerge "Deprecate $wgExternalDiffEngine = 'wikidiff2'"
jenkins-bot [Thu, 26 Jul 2018 21:37:00 +0000 (21:37 +0000)]
Merge "Deprecate $wgExternalDiffEngine = 'wikidiff2'"

5 years agoCheck for right-* messages as a structure test
Kunal Mehta [Thu, 26 Jul 2018 21:14:54 +0000 (14:14 -0700)]
Check for right-* messages as a structure test

Structure tests run for extensions as well, which this test should. All
user rights should have right-* messages for display in the interface.

Bug: T143156
Change-Id: I23b8eb66bc68121b2ae17e73e705acd3e6f2d053

5 years agoPrefill date in form on Special:Log when calling with old parameters
Bartosz Dziewoński [Thu, 26 Jul 2018 19:55:24 +0000 (21:55 +0200)]
Prefill date in form on Special:Log when calling with old parameters

When the date is specified using &year=...&month=... URL parameters
rather than &wpdate=..., HTMLForm can't automatically fill it in,
but we can explicitly specify the default.

Bug: T199856
Change-Id: I71f4953d57a3893190778e5bd763db108dc433d3

5 years agoReverseChronologicalPager: Fix timezone confusion
Bartosz Dziewoński [Mon, 23 Jul 2018 21:34:40 +0000 (23:34 +0200)]
ReverseChronologicalPager: Fix timezone confusion

(This change is best tested with Special:Log before changes from
38756eae4, since it seems the $mDay/$mMonth/$mYear values are not
directly used anywhere in core after that.)

The setTimezone() call did not actually change the offset used for
database lookup, because getTimestamp() returns a Unix timestamp,
which by definition does not include timezone information.

It did change the offset used for year/month/day fields in the
interface, but it changed it in the wrong direction: instead of
assuming the date is in local timezone and converting to UTC, it
assumed the date is in UTC and converted it to local timezone.

We don't actually want to do anything with timezones here. For better
or worse, the date selectors for pagers have always used UTC dates.
The timezone code was only introduced relatively recently in 53fa809a.

What we really want for the interface is to display the previous
date, relative to the database offset. The interface asks the user
to select the month/date up to which to display things (such as
"May 2018 (and earlier)"), but the database queries use strict
comparison (such as `log_timestamp < '20180601000000'`), so the
database offset is calculated to the next date after selected one.

The incorrect timezone calculation accidentally did so, but only if
the wiki timezone had a negative offset relative to the UTC. If the
wiki was using UTC or a timezone with positive offset, the correction
was not applied, causing the selected date in the interface to move
one day forward from the date that was set.

Bug: T171110
Change-Id: I8c2cd398d7c7ac68a8f46ee94cb9e7c6beed5694

5 years agoMerge "Prefill username in form when calling Special:Log/<username>"
jenkins-bot [Thu, 26 Jul 2018 20:06:13 +0000 (20:06 +0000)]
Merge "Prefill username in form when calling Special:Log/<username>"

5 years agoMerge "Handle $title === null in Title::newFromText"
jenkins-bot [Thu, 26 Jul 2018 19:33:03 +0000 (19:33 +0000)]
Merge "Handle $title === null in Title::newFromText"

5 years agoMerge "SelectWithInput: Add 'disabled' property on main widget"
jenkins-bot [Thu, 26 Jul 2018 19:17:35 +0000 (19:17 +0000)]
Merge "SelectWithInput: Add 'disabled' property on main widget"

5 years agoMerge "GlobalFunctions: Enable patch-coverage for wfExpandUrl test"
jenkins-bot [Thu, 26 Jul 2018 18:59:10 +0000 (18:59 +0000)]
Merge "GlobalFunctions: Enable patch-coverage for wfExpandUrl test"

5 years agoMerge "INSTALL: Don't warn against using PHP "as a CGI plugin""
jenkins-bot [Thu, 26 Jul 2018 18:48:28 +0000 (18:48 +0000)]
Merge "INSTALL: Don't warn against using PHP "as a CGI plugin""

5 years agoMerge "Update jetbrains/phpstorm-stubs"
jenkins-bot [Thu, 26 Jul 2018 18:46:06 +0000 (18:46 +0000)]
Merge "Update jetbrains/phpstorm-stubs"

5 years agoHandle $title === null in Title::newFromText
Gergő Tisza [Thu, 26 Jul 2018 18:39:21 +0000 (20:39 +0200)]
Handle $title === null in Title::newFromText

This relied on TitleCodec throwing MalformedTitleException in the
past, but that is fragile as other parts of the logic do not
expect null.

Bug: T200456
Change-Id: I1aca3971e2a9c0b1fe3adbcf34f3ee65b2271234

5 years agoDisallow empty paths in LockManager
Aaron Schulz [Thu, 26 Jul 2018 17:42:34 +0000 (10:42 -0700)]
Disallow empty paths in LockManager

Fix broken FileBackend test that had paths normalizing to null.

Change-Id: I8a7e88ae44118cc9578e1b306a5a008ccefc23af

5 years agoUpdate composer/spdx-licenses to 1.4.0 and mediawiki/mediawiki-codesniffer to 21.0.0
Reedy [Thu, 26 Jul 2018 16:31:49 +0000 (17:31 +0100)]
Update composer/spdx-licenses to 1.4.0 and mediawiki/mediawiki-codesniffer to 21.0.0

https://github.com/composer/spdx-licenses/compare/1.3.0...1.4.0

Change-Id: I39f7a1310455159866bfed5224536e800befec0d

5 years agoUpdate jetbrains/phpstorm-stubs
Reedy [Thu, 26 Jul 2018 17:14:22 +0000 (18:14 +0100)]
Update jetbrains/phpstorm-stubs

Change-Id: I553afcc8f0126b9611dd9fce26029bd9c9e17071

5 years agoPrefill username in form when calling Special:Log/<username>
Jayprakash12345 [Thu, 26 Jul 2018 16:50:56 +0000 (22:20 +0530)]
Prefill username in form when calling Special:Log/<username>

Bug: T200446
Change-Id: I3f2fcedee8440d5943e556f7c1c06dfb1085e549

5 years agoMerge "Upstream EasyDeflate library from VisualEditor"
jenkins-bot [Thu, 26 Jul 2018 15:06:41 +0000 (15:06 +0000)]
Merge "Upstream EasyDeflate library from VisualEditor"

5 years agoFix PerDbnameStatsdDataFactory metric prefix
addshore [Thu, 26 Jul 2018 12:23:38 +0000 (13:23 +0100)]
Fix PerDbnameStatsdDataFactory metric prefix

This was reporting Mediawikiwikidatawiki for example as the '.'
was added inside the rtrim call

Bug: T196609
Bug: T200424
Change-Id: Ia8e51371b9a27ed14ec55bb34a52ec9e65ad55cf

5 years agoMerge "Deprecate public access to some DifferenceEngine properties"
jenkins-bot [Thu, 26 Jul 2018 12:06:05 +0000 (12:06 +0000)]
Merge "Deprecate public access to some DifferenceEngine properties"

5 years agoDeprecate $wgExternalDiffEngine = 'wikidiff2'
Gergő Tisza [Wed, 11 Jul 2018 11:11:25 +0000 (13:11 +0200)]
Deprecate $wgExternalDiffEngine = 'wikidiff2'

The value 'wikidiff2' for $wgExternalDiffEngine was obsoleted in
I32b670ebf6 but not formally deprecated. Let's do that now.

Change-Id: Ie5ccd3895544cf393885b84d38eca6003c79e8ad
Depends-On: I33c6207cfc5fb66987d31818bc27055f597d28c7

5 years agoDeprecate public access to some DifferenceEngine properties
Gergő Tisza [Wed, 11 Jul 2018 08:54:58 +0000 (10:54 +0200)]
Deprecate public access to some DifferenceEngine properties

These had no business being public in the first place and there is
no usage in Gerrit. In case something does use them, it will probably
be broken by the refactoring that's soon to come, so the deprecation
warning makes it easier to figure out where the problem lies.

Change-Id: I72ba5cfbf91f4af16028ba4f8619df6a7168a786

5 years agoUse setContentLang() instead of setMwGlobals()
Aryeh Gregor [Wed, 25 Jul 2018 14:57:23 +0000 (17:57 +0300)]
Use setContentLang() instead of setMwGlobals()

This changes behavior in some tests by making them set $wgLanguageCode
as well as $wgContLang, but that seems like a good thing.

Bug: T200246
Change-Id: I936888f46ff9fefe2707efba837e2ce3a7ca5e3f

5 years agoRemove two unused OutputPage methods
Aryeh Gregor [Tue, 24 Jul 2018 13:45:02 +0000 (16:45 +0300)]
Remove two unused OutputPage methods

addMetadataLink and getMetadataAttribute were added in 2004 (22f8c4ce)
for functionality that was moved to extensions in 2011 (27c3b22b).
Those extensions, CreateCommonsRdf and DublinCoreRdf, now use
addHeadItem() directly.  There are no other callers in core or
extensions.

Change-Id: I4bc21fdaefc8f56969a2950eb53b340bf4aac399

5 years agoMerge "Use 'default' instead of 'value' in HTMLTextField"
jenkins-bot [Thu, 26 Jul 2018 09:05:18 +0000 (09:05 +0000)]
Merge "Use 'default' instead of 'value' in HTMLTextField"

5 years agoINSTALL: Don't warn against using PHP "as a CGI plugin"
Kevin Israel [Thu, 26 Jul 2018 05:36:19 +0000 (01:36 -0400)]
INSTALL: Don't warn against using PHP "as a CGI plugin"

This note is very old; it was added in r2832 (635388356be70130) and
r3285 (7ab7a50cf928861f). Modern versions of MediaWiki support CGI and
FastCGI installations nearly as well as mod_php installations. In fact,
Wikimedia currently uses HHVM's "fastcgi" server type, and intends to
use php-fpm with PHP 7 (see migration plan in T176370).

For a basic MediaWiki installation using the web installer, the only
difference I know of is the default URLs: /w/index.php?title=$1 for CGI,
as opposed to /w/index.php/$1 for mod_php. This issue is easy to fix by
changing $wgArticlePath, if the web server sets REQUEST_URI. Admins who
want to use short URLs (e.g. /wiki/$1) have to do this anyway.

Also, in img_auth.php and the "img-auth-nopathinfo" message, don't imply
that CGI and FastCGI server configurations generally can't provide path
information or support MediaWiki features that need it.

Change-Id: I89212e9d51f950a58f911083b9e109b69cd4e060

5 years agoMerge "Add helper trait for deprecating properties"
jenkins-bot [Wed, 25 Jul 2018 22:49:39 +0000 (22:49 +0000)]
Merge "Add helper trait for deprecating properties"

5 years agoMake MessageCache use APC for big messages
Aaron Schulz [Mon, 25 Jun 2018 12:16:15 +0000 (13:16 +0100)]
Make MessageCache use APC for big messages

Bug: T118893
Change-Id: I418d0ca490911d7ee4213fe1728cfbc637ef8b10

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 25 Jul 2018 19:57:29 +0000 (21:57 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I69852319aa363902ca532563bee3938103e1be41

5 years agoUse 'default' instead of 'value' in HTMLTextField
Jayprakash12345 [Wed, 25 Jul 2018 19:38:16 +0000 (01:08 +0530)]
Use 'default' instead of 'value' in HTMLTextField

Bug: T193087
Change-Id: I631970797a778caa77d3605e0a5b8ca00e2cb56e

5 years agoGlobalFunctions: Enable patch-coverage for wfExpandUrl test
Timo Tijhof [Wed, 25 Jul 2018 17:24:48 +0000 (18:24 +0100)]
GlobalFunctions: Enable patch-coverage for wfExpandUrl test

Change-Id: I3b4594dab0aba659cc47233f7be3da751066b7de

5 years agoMerge "Make the 'other' option superessable in getSuggestedDurations"
jenkins-bot [Wed, 25 Jul 2018 17:06:06 +0000 (17:06 +0000)]
Merge "Make the 'other' option superessable in getSuggestedDurations"

5 years agoMerge "Follow-up 9742d569b: Replace accidental \t in i18n with a space"
jenkins-bot [Wed, 25 Jul 2018 16:23:13 +0000 (16:23 +0000)]
Merge "Follow-up 9742d569b: Replace accidental \t in i18n with a space"

5 years agoMerge "Deprecate $wgShowSQLErrors and $wgShowDBErrorBacktrace and make nonfunctional"
jenkins-bot [Wed, 25 Jul 2018 16:22:22 +0000 (16:22 +0000)]
Merge "Deprecate $wgShowSQLErrors and $wgShowDBErrorBacktrace and make nonfunctional"

5 years agoDeprecate $wgShowSQLErrors and $wgShowDBErrorBacktrace and make nonfunctional
Bill Pirkle [Tue, 17 Jul 2018 16:51:36 +0000 (11:51 -0500)]
Deprecate $wgShowSQLErrors and $wgShowDBErrorBacktrace and make nonfunctional

Clarify and simplify exception output by deprecating
$wgShowSQLErrors and wgShowDBErrorBacktrace.
$wgShowExceptionDetails will now control most related output.
$wgShowHostnames will now solely control output of
MWExceptionRenderer::reportOutageHTML.

Bug: T165768
Change-Id: Idead2c11c499463dfa6293c3d4b33be3bde92e1a

5 years agoFollow-up 9742d569b: Replace accidental \t in i18n with a space
James D. Forrester [Wed, 25 Jul 2018 15:34:51 +0000 (08:34 -0700)]
Follow-up 9742d569b: Replace accidental \t in i18n with a space

Change-Id: Id8ad5916b7dd59a078fb600c7998e41f1b8abd3c

5 years agoMerge "Make load* methods of DifferenceEngine idempotent"
jenkins-bot [Wed, 25 Jul 2018 15:33:48 +0000 (15:33 +0000)]
Merge "Make load* methods of DifferenceEngine idempotent"

5 years agoMerge "cache: Minor docs for MessageCache interaction with WANObjectCache"
jenkins-bot [Wed, 25 Jul 2018 14:52:44 +0000 (14:52 +0000)]
Merge "cache: Minor docs for MessageCache interaction with WANObjectCache"

5 years agocache: Minor docs for MessageCache interaction with WANObjectCache
Timo Tijhof [Sun, 22 Jul 2018 23:52:41 +0000 (00:52 +0100)]
cache: Minor docs for MessageCache interaction with WANObjectCache

Follows-up 04bc03a29a.

Change-Id: I8fb810fc2e08277bb64fa18595483a2161cfb1cc

5 years agoMerge "Fallback language for Santali should be English"
jenkins-bot [Wed, 25 Jul 2018 11:59:58 +0000 (11:59 +0000)]
Merge "Fallback language for Santali should be English"

5 years agoSelectWithInput: Add 'disabled' property on main widget
Prateek Saxena [Wed, 25 Jul 2018 05:29:03 +0000 (10:59 +0530)]
SelectWithInput: Add 'disabled' property on main widget

…also HTMLSelectAndOtherField and HTMLSelectOrOtherField now
pass the 'disabled' field when creating the input widget.

The OOUI versions of these HTMLFormFields would get enabled
right after infusion even they were disabled in PHP. This
makes sure that they remain disabled.

Change-Id: Iddd8ad81731dba7bdcb599d6fe104cb259b11733

5 years agoMerge "ApiBase: Use prefixed parameter name for 'missingparam' error"
jenkins-bot [Wed, 25 Jul 2018 05:29:12 +0000 (05:29 +0000)]
Merge "ApiBase: Use prefixed parameter name for 'missingparam' error"

5 years agoMerge "Make OutputPage::mPagetitle private"
jenkins-bot [Wed, 25 Jul 2018 04:40:53 +0000 (04:40 +0000)]
Merge "Make OutputPage::mPagetitle private"

5 years agoMerge "objectcache: improve logging and error handling in BagOStuff"
jenkins-bot [Wed, 25 Jul 2018 04:16:18 +0000 (04:16 +0000)]
Merge "objectcache: improve logging and error handling in BagOStuff"

5 years agoFallback language for Santali should be English
Martin Urbanec [Tue, 24 Jul 2018 19:47:50 +0000 (21:47 +0200)]
Fallback language for Santali should be English

Bug: T200290
Change-Id: I65005b8b31bd022c7978628f69c5d56d735063e3

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 24 Jul 2018 19:53:03 +0000 (21:53 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Idbc346a6c0d5bf2bdc2278bc2ef3440579500dc7

5 years agoobjectcache: improve logging and error handling in BagOStuff
Aaron Schulz [Thu, 12 Jul 2018 15:26:13 +0000 (16:26 +0100)]
objectcache: improve logging and error handling in BagOStuff

Bug: T198239
Bug: T199383
Change-Id: I0b4110396d03b98e83a7b614caf57d7e7c284361

5 years agoMerge "PageArchive: Pass correct overrides to newRevisionFromArchiveRow()"
jenkins-bot [Tue, 24 Jul 2018 16:18:25 +0000 (16:18 +0000)]
Merge "PageArchive: Pass correct overrides to newRevisionFromArchiveRow()"

5 years agoMerge "Avoid a redirect loop when the request URL is not normalized"
jenkins-bot [Tue, 24 Jul 2018 16:13:39 +0000 (16:13 +0000)]
Merge "Avoid a redirect loop when the request URL is not normalized"

5 years agoMake the 'other' option superessable in getSuggestedDurations
Huji Lee [Mon, 30 Apr 2018 01:38:42 +0000 (21:38 -0400)]
Make the 'other' option superessable in getSuggestedDurations

Bug: T193364
Change-Id: Ic2dbc961f7eebad11da53724b9cce2f804ffad39

5 years agoMake OutputPage::mPagetitle private
Aryeh Gregor [Tue, 24 Jul 2018 13:38:44 +0000 (16:38 +0300)]
Make OutputPage::mPagetitle private

Code search revealed only one outside access, which I've submitted a patch for.

Depends-On: I001deecad241b091070483d882088d2d6361ed5a
Change-Id: I0f7e565f4eacc1074c619772b2d11a47a05e3584

5 years agothiemowmde's legal name changed
Thiemo Kreuz (WMDE) [Tue, 24 Jul 2018 06:02:55 +0000 (06:02 +0000)]
thiemowmde's legal name changed

I was a co-author only, and my contribution was not really
noteworthy, so I choose to remove the outdated name (in this
case only).

Change-Id: I9d9592d5b114adae633f6a4bdac2dd60f329bd7a

5 years agoMerge "LogEventsList: Correct typo"
jenkins-bot [Tue, 24 Jul 2018 01:54:31 +0000 (01:54 +0000)]
Merge "LogEventsList: Correct typo"

5 years agoMerge "$wgHttpsPort should only be used in very special cases"
jenkins-bot [Tue, 24 Jul 2018 01:13:32 +0000 (01:13 +0000)]
Merge "$wgHttpsPort should only be used in very special cases"

5 years agoMerge "LogPager: Add backwards-compatibility for hide_[type]_log URL params"
jenkins-bot [Mon, 23 Jul 2018 20:55:21 +0000 (20:55 +0000)]
Merge "LogPager: Add backwards-compatibility for hide_[type]_log URL params"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 23 Jul 2018 20:08:57 +0000 (22:08 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I8b632d4052c2634867c7d498305cf287d2fc58c9

5 years agoRevert "Ensure LanguageCode::bcp47() returns a valid BCP 47 language code"
Greg Grossmeier [Mon, 23 Jul 2018 16:45:31 +0000 (16:45 +0000)]
Revert "Ensure LanguageCode::bcp47() returns a valid BCP 47 language code"

This reverts commit 8380f0173e79b66f0e2afd6c49cd88afb9f4f6f3.

Reason for revert: Caused T199941

Bug: T199941
Change-Id: I93af756a2d70d6bc91f828fe6ac19bf10ca8788f

5 years agoMerge "Revert "Accept BCP 47 codes as aliases for nonstandard variants""
jenkins-bot [Mon, 23 Jul 2018 17:22:32 +0000 (17:22 +0000)]
Merge "Revert "Accept BCP 47 codes as aliases for nonstandard variants""

5 years agoRevert "Accept BCP 47 codes as aliases for nonstandard variants"
Greg Grossmeier [Mon, 23 Jul 2018 16:44:55 +0000 (16:44 +0000)]
Revert "Accept BCP 47 codes as aliases for nonstandard variants"

This reverts commit 0818070c59eb4e8330496796b943951c01c7a573.

Reason for revert: Caused T199941

Bug: T199941
Change-Id: I24c178eb33890477de79cbb3122861c140578011

5 years agoMerge "LogEventsList: Use DerivativeContext"
jenkins-bot [Mon, 23 Jul 2018 16:28:45 +0000 (16:28 +0000)]
Merge "LogEventsList: Use DerivativeContext"

5 years agoLogEventsList: Correct typo
Bartosz Dziewoński [Mon, 23 Jul 2018 16:18:04 +0000 (18:18 +0200)]
LogEventsList: Correct typo

The parameter to getTitleInputDesc() is actually unused, so this was
not breaking anything.

Change-Id: Ia301faf511e30b4fc4542ccb80b24cf807cf731c

5 years agoApiBase: Use prefixed parameter name for 'missingparam' error
Brad Jorsch [Mon, 23 Jul 2018 13:22:23 +0000 (09:22 -0400)]
ApiBase: Use prefixed parameter name for 'missingparam' error

Similar errors use the prefixed parameter name, this one should too.

Bug: T200155
Change-Id: Ia14d6a9c457af06e72428c1eae14bd3849b4595a

5 years agoPageArchive: Pass correct overrides to newRevisionFromArchiveRow()
Brad Jorsch [Mon, 23 Jul 2018 12:44:02 +0000 (08:44 -0400)]
PageArchive: Pass correct overrides to newRevisionFromArchiveRow()

Revision::newFromArchiveRow took 'page' as an override for ar_page_id,
while RevisionStore::newRevisionFromArchiveRow() needs 'page_id'.

Thanks to sanity checks elsewhere in RevisionStore, this mistaken
override causes an exception to be thrown rather than undeleted
revisions potentially pointing to the wrong page.

Bug: T200072
Change-Id: I9d7543866c674f4d8aea9ec00fcc15cbf616ca66

5 years agoLogEventsList: Use DerivativeContext
Prateek Saxena [Mon, 23 Jul 2018 04:22:36 +0000 (09:52 +0530)]
LogEventsList: Use DerivativeContext

Bug: T200136
Change-Id: Ie2b7753684dc0257b0b53d9c9314feeb14d99182

5 years agoMerge "HTMLMultiSelectField: Improve compat with GET forms with no wpFormIdentifier"
jenkins-bot [Mon, 23 Jul 2018 02:55:53 +0000 (02:55 +0000)]
Merge "HTMLMultiSelectField: Improve compat with GET forms with no wpFormIdentifier"

5 years agoAdded non-parallel fallback to MultiHttpClient when curl is unavailable
Bill Pirkle [Thu, 12 Jul 2018 22:07:54 +0000 (17:07 -0500)]
Added non-parallel fallback to MultiHttpClient when curl is unavailable

If the curl extension is not available, fall back to the existing
HttpRequestFactory and associated classes. Also added related phpunit tests.

Bug: T139169
Change-Id: I2f9d4acbb491bce28d7105e124c5cee7e16e86d7

5 years agoMerge "Make MessageCache use getWithSetCallback() for big messages"
jenkins-bot [Sun, 22 Jul 2018 23:59:18 +0000 (23:59 +0000)]
Merge "Make MessageCache use getWithSetCallback() for big messages"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 22 Jul 2018 19:52:41 +0000 (21:52 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I93c905909b83a89898922e241610275186e5346b

5 years agoSegregate right to edit sitewide CSS/JS
Gergő Tisza [Tue, 20 Mar 2018 22:44:27 +0000 (15:44 -0700)]
Segregate right to edit sitewide CSS/JS

To limit the likelihood of incidents like T189665, the ability to
edit sitewide CSS/JSON/JS is split out from editinterface, into
separate 'editsitecss', 'editsitejson' and 'editsitejs' rights.

editsitecss, editsitejs, and the right to edit another (potentially
more privileged) user's personal CSS/JS is removed from sysops, and
a new user group, interface-admin, is created specifically for that
task (along with a new grant group 'editsiteconfig').

interface-admin is granted to the first user of a new wiki, along with
sysop and bureaucrat.

Bug: T120886
Bug: T190015
Depends-On: Ia9b2ea1450aff6121dc0f3777bf029292c8aaad9
Change-Id: Ifefd872640642441e26f8b2f144ffe4b88d2eb12

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 21 Jul 2018 19:52:53 +0000 (21:52 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I848c703ad10f39827730fcdacdd83b4ad47b346d

5 years agoMerge "Explicitly mark Skin::makeVariablesScript() public"
jenkins-bot [Sat, 21 Jul 2018 00:55:09 +0000 (00:55 +0000)]
Merge "Explicitly mark Skin::makeVariablesScript() public"

5 years agoMerge "Fix octal escape sequence overflow in FiltersTest.php"
jenkins-bot [Fri, 20 Jul 2018 20:37:45 +0000 (20:37 +0000)]
Merge "Fix octal escape sequence overflow in FiltersTest.php"

5 years agoExplicitly mark Skin::makeVariablesScript() public
Reedy [Fri, 20 Jul 2018 20:02:40 +0000 (21:02 +0100)]
Explicitly mark Skin::makeVariablesScript() public

Remove else. If contains an unconditional return

Change-Id: I57a04339395d947dffbc3595d321106d4fd8256c

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 20 Jul 2018 19:53:15 +0000 (21:53 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I01a747cba68c60850761ac5dcef992bcebaaf6b5

5 years agoMerge "Send API timing to statsd for all requests, not just writes"
jenkins-bot [Fri, 20 Jul 2018 15:13:48 +0000 (15:13 +0000)]
Merge "Send API timing to statsd for all requests, not just writes"

5 years agoAdd maintenance script for resetting login/signup throttle
Gergő Tisza [Mon, 28 May 2018 16:25:36 +0000 (16:25 +0000)]
Add maintenance script for resetting login/signup throttle

Bug: T194506
Change-Id: I6dda5f516ba47a452e438946379fcb696c8c87f9

5 years agoMerge "filebackend: let any specific backend value of "readOnly" override the default"
jenkins-bot [Fri, 20 Jul 2018 10:51:35 +0000 (10:51 +0000)]
Merge "filebackend: let any specific backend value of "readOnly" override the default"

5 years agoMerge "JobQueueGroup: Allow readOnlyReason to be specified per JQ type"
jenkins-bot [Fri, 20 Jul 2018 10:30:37 +0000 (10:30 +0000)]
Merge "JobQueueGroup: Allow readOnlyReason to be specified per JQ type"

5 years agoMerge "Install cache/integration-tests as require-dev"
jenkins-bot [Fri, 20 Jul 2018 10:21:48 +0000 (10:21 +0000)]
Merge "Install cache/integration-tests as require-dev"

5 years agoInstall cache/integration-tests as require-dev
addshore [Wed, 18 Jul 2018 10:47:27 +0000 (12:47 +0200)]
Install cache/integration-tests as require-dev

Bug: T199440
Change-Id: I1e50d7202a5d02088319ec9e90e0136519cba1ce

5 years agoGlobalFunctions: use a closure instead of polluting global namespace
Max Semenik [Fri, 20 Jul 2018 06:54:49 +0000 (23:54 -0700)]
GlobalFunctions: use a closure instead of polluting global namespace

Change-Id: Ia587008de75a8bde90ad45d4932284f0b6401845

5 years agoSend API timing to statsd for all requests, not just writes
Tim Starling [Fri, 20 Jul 2018 06:49:49 +0000 (16:49 +1000)]
Send API timing to statsd for all requests, not just writes

The rate will be about 8k req/s, whereas currently graphite1001
receives about 350k metric updates per second, so we would expect
this to increase statsd load by about 2%.

This would have been very helpful in diagnosing API cluster overload
incidents such as the one on July 11.

Change-Id: I0a248e1bcec05915d98ec735f4cfb9800e64412d

5 years agoMerge "language: Document sources of data and example usage"
jenkins-bot [Fri, 20 Jul 2018 06:12:44 +0000 (06:12 +0000)]
Merge "language: Document sources of data and example usage"

5 years agoMerge "resourceloader: CSSMin::getLocalFileReferences now strips anchors"
jenkins-bot [Fri, 20 Jul 2018 04:59:31 +0000 (04:59 +0000)]
Merge "resourceloader: CSSMin::getLocalFileReferences now strips anchors"

5 years agoMerge "Language::listToText: Avoid PHP warnings from E_STRICT"
jenkins-bot [Fri, 20 Jul 2018 04:56:09 +0000 (04:56 +0000)]
Merge "Language::listToText: Avoid PHP warnings from E_STRICT"

5 years agoresourceloader: CSSMin::getLocalFileReferences now strips anchors
Antoine Musso [Tue, 17 Jul 2018 15:59:17 +0000 (17:59 +0200)]
resourceloader: CSSMin::getLocalFileReferences now strips anchors

When processing:

  url( 'foo.svg#anchors' )

getLocalFileReferences() would yield a file 'foo.svg#anchors'. It might
occur with upstream libraries, such as WikiFonts used by the Refreshed
skin.

When a path is found, strip the anchor entirely. Skip the case if that
results in an empty file.

remap() would properly skip the behavior "#default#', also skip url that
are solely an anchor such as '#other'.

Add a few test cases to cover CSSMin::getLocalFileReferences and cover
anchors usage in CSSMin::remap.

Bug: T115436
Change-Id: I1749ddc2b89021807f42d64131931ad7a99a7b43

5 years agolanguage: Document sources of data and example usage
Timo Tijhof [Fri, 20 Jul 2018 03:06:28 +0000 (20:06 -0700)]
language: Document sources of data and example usage

Change-Id: I0c72069d010285d9b88ff83bc1478410961065d3

5 years agoparserTests: re-enable save parse and fix MCR errors
Tim Starling [Fri, 20 Jul 2018 02:03:48 +0000 (12:03 +1000)]
parserTests: re-enable save parse and fix MCR errors

* Re-enable parse on save as requested in T159014, instead hide
  the feature behind an option.
* Add the MCR tables to the list of tables that need to be cloned. Fixes
  unconditional exception.
* Fix some undefined member variables, remove assignment to unused
  variable $this->databaseSetupDone.

Bug: T159014
Change-Id: I6be577ebcbadeb4e08079a82543d521fc2bb5948

5 years agoLogPager: Add backwards-compatibility for hide_[type]_log URL params
Prateek Saxena [Thu, 19 Jul 2018 05:02:24 +0000 (10:32 +0530)]
LogPager: Add backwards-compatibility for hide_[type]_log URL params

Also, the $default value in LogEventsList#getFiltersDesc was not
being generated properly and would have always been an empty array.

Bug: T199856
Change-Id: Id286c76259406521f12cda67a4a715032e022637

5 years agoMerge "Convert Title::getTitleCache() to using MapCacheLRU (again)"
jenkins-bot [Fri, 20 Jul 2018 00:06:16 +0000 (00:06 +0000)]
Merge "Convert Title::getTitleCache() to using MapCacheLRU (again)"