lhc/web/wiklou.git
5 years agoDon't require a list of services in tests
Aryeh Gregor [Tue, 7 Aug 2018 16:33:20 +0000 (19:33 +0300)]
Don't require a list of services in tests

We already have two lists in other files, there's no need for a third.

Change-Id: I516a26e1170834b27aafeb0049a5893ec965d820

5 years agoAlphabetize service lists
Aryeh Gregor [Fri, 3 Aug 2018 08:05:44 +0000 (11:05 +0300)]
Alphabetize service lists

Adding everything at the end makes the list arbitrarily ordered, and
also invites lots of merge conflicts as new things are added.

Change-Id: I58bcca4fa79140f5d5f2f6ef447e67035cc37aae

5 years agoMerge "Comments and code cleanup in OutputPage"
jenkins-bot [Thu, 9 Aug 2018 18:06:05 +0000 (18:06 +0000)]
Merge "Comments and code cleanup in OutputPage"

5 years agoMerge "MapCacheLRU: Fix a typo in a comment"
jenkins-bot [Thu, 9 Aug 2018 17:58:55 +0000 (17:58 +0000)]
Merge "MapCacheLRU: Fix a typo in a comment"

5 years agoMerge "Remove duplicated article usages"
jenkins-bot [Thu, 9 Aug 2018 16:13:31 +0000 (16:13 +0000)]
Merge "Remove duplicated article usages"

5 years agoAdd wrapper to search form widget
Tim Eulitz [Thu, 9 Aug 2018 12:43:47 +0000 (14:43 +0200)]
Add wrapper to search form widget

This wrapper element will be used to prevent the search page from
jumping after AdvancedSearch has finished loading.

Bug: T199226
Change-Id: I8d9d68862c57f7de82ea050bf847d6bcdacdd47a

5 years agoRemove duplicated article usages
petarpetkovic [Thu, 9 Aug 2018 08:21:56 +0000 (10:21 +0200)]
Remove duplicated article usages

Bug: T201491
Change-Id: I72b1e7609b49b9bf182c0872f8b780d9e9e08695

5 years agoMerge "RCFilters: Export i18n messages as a config var instead of inline script"
jenkins-bot [Thu, 9 Aug 2018 04:26:56 +0000 (04:26 +0000)]
Merge "RCFilters: Export i18n messages as a config var instead of inline script"

5 years agordbms: add more comments and sanity checks for CONN_TRX_AUTOCOMMIT
Aaron Schulz [Tue, 3 Jul 2018 12:42:45 +0000 (13:42 +0100)]
rdbms: add more comments and sanity checks for CONN_TRX_AUTOCOMMIT

Change-Id: I69992cf2e2ae3ef62125b0bc733a0cb7274f814e

5 years agoRCFilters: Export i18n messages as a config var instead of inline script
Roan Kattouw [Thu, 9 Aug 2018 01:31:04 +0000 (18:31 -0700)]
RCFilters: Export i18n messages as a config var instead of inline script

We used to generate an inline script tag with an mw.messages.set(...)
call to export these i18n messages, but there are no guarantees that
this script tag will run before mw.rcfilters.init does and tries to
access these messages. This race condition doesn't seem to be happening
in practice right now, but dec800968eb makes it more probable.

Instead, export the messages object as a config var in mw.config, and
import it into mw.messages at the start of mw.rcfilters.init. This just
moves the blob from one inline script tag to another, but mw.config is
guaranteed to be populated before any modules execute.

Longer term, we should move these messages, as well as the filter
definitions, to a ResourceLoader module rather than embedding them in
every page view. I filed T201574 for that.

Bug: T192623
Change-Id: I2d58f55701b28876a6491432cee0fc56f97ff00b

5 years agoMerge "resourceloader: Add to debug mode the same 'jquery' clause as for prod"
jenkins-bot [Thu, 9 Aug 2018 00:15:47 +0000 (00:15 +0000)]
Merge "resourceloader: Add to debug mode the same 'jquery' clause as for prod"

5 years agoresourceloader: Add to debug mode the same 'jquery' clause as for prod
Timo Tijhof [Wed, 8 Aug 2018 21:58:33 +0000 (22:58 +0100)]
resourceloader: Add to debug mode the same 'jquery' clause as for prod

=== module.exports

Follows-up dec800968e, which added a clause for `window.$` inside runScript()
that ensures require/module.exports is not given to 'jquery'.

This commit adds the same clause to debug mode handling, which follows a
different code path. Without this, jquery.migrate.js execution throws from
`require('jquery')`, when viewing a page in debug mode.

=== mediawiki.legacy.wikibits

Before dec800968e, 'jquery' was a raw module and not allowed as dependency,
and before that commit base modules did not follow debug mode. Instead,
they were always combined in the same request (even in debug mode), with
only the order in the query string dictating their execution order.

After that commit, it is mandatory for base modules to express their
execution order through dependency links. This was done for 'mediawiki.base',
but forgotten for 'mediawiki.legacy.wikibits'. That module isn't used by
default, but becomes used when enabling $wgIncludeLegacyJavaScript, which
is off by default, but on for Wikimedia wikis.

Bug: T192623
Change-Id: Id4fbfee71deeb9528e8a622604d4cd972dd25d3b

5 years agoMerge "objectcache: add "epoch" parameter to WANObjectCache"
jenkins-bot [Wed, 8 Aug 2018 23:16:40 +0000 (23:16 +0000)]
Merge "objectcache: add "epoch" parameter to WANObjectCache"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 8 Aug 2018 19:54:45 +0000 (21:54 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I55a2fab29c43bbfaa39cd8e26ce7ee648258598e

5 years agoMerge "resourceloader: Combine base modules and page modules requests"
jenkins-bot [Wed, 8 Aug 2018 17:47:27 +0000 (17:47 +0000)]
Merge "resourceloader: Combine base modules and page modules requests"

5 years agoMerge "Remove special collation for Northern Sami"
jenkins-bot [Wed, 8 Aug 2018 16:50:44 +0000 (16:50 +0000)]
Merge "Remove special collation for Northern Sami"

5 years agoMerge "LogFormatter: Fail softer when trying to link an invalid titles"
jenkins-bot [Wed, 8 Aug 2018 15:35:56 +0000 (15:35 +0000)]
Merge "LogFormatter: Fail softer when trying to link an invalid titles"

5 years agoMerge "search: Use self::class instead of __CLASS__ in SearchResultSet"
jenkins-bot [Wed, 8 Aug 2018 14:56:08 +0000 (14:56 +0000)]
Merge "search: Use self::class instead of __CLASS__ in SearchResultSet"

5 years agoMerge "Fix common typos"
jenkins-bot [Wed, 8 Aug 2018 13:54:09 +0000 (13:54 +0000)]
Merge "Fix common typos"

5 years agoFix common typos
petarpetkovic [Wed, 8 Aug 2018 11:14:01 +0000 (13:14 +0200)]
Fix common typos

Bug: T201491
Change-Id: Ia5abc6ae327ee9b5aeecb4b40f00ebb0285283a9

5 years agoFix the GlobalTitleFail debug notice for HTMLButtonFields
mainframe98 [Wed, 8 Aug 2018 10:45:04 +0000 (11:45 +0100)]
Fix the GlobalTitleFail debug notice for HTMLButtonFields

These occur when buttonlabel-message is set. HTMLButtonField
parses the message in its constructor, but at that point the
context (provided by the form field by HTMLForm::$mParent) is
not yet available. The constructor of HTMLForm assigns $mParent,
but that constructor is only called after the button label
message is parsed.

Bug: T201497
Change-Id: I021c9ecf3bc934f2cf55ec100e799c1c12e7bc01

5 years agoFix 'extenson' typo
petarpetkovic [Wed, 8 Aug 2018 09:24:17 +0000 (11:24 +0200)]
Fix 'extenson' typo

Bug: T201491
Change-Id: I4fcae5d21e64b568ec78639a7e6a5d60bde939da

5 years agoMapCacheLRU: Fix a typo in a comment
Niklas Laxström [Wed, 8 Aug 2018 07:31:54 +0000 (09:31 +0200)]
MapCacheLRU: Fix a typo in a comment

Change-Id: I573623f219f83528ea46ee31d656fce935b3b431

5 years agoMerge "Fix comma in Tajik Cyrillic dates"
jenkins-bot [Wed, 8 Aug 2018 07:02:37 +0000 (07:02 +0000)]
Merge "Fix comma in Tajik Cyrillic dates"

5 years agoMerge "Add numeral conversion for Saraiki"
jenkins-bot [Wed, 8 Aug 2018 06:53:31 +0000 (06:53 +0000)]
Merge "Add numeral conversion for Saraiki"

5 years agoMerge "Reuse different message in SpecialEditWatchlist"
jenkins-bot [Wed, 8 Aug 2018 04:26:53 +0000 (04:26 +0000)]
Merge "Reuse different message in SpecialEditWatchlist"

5 years agoresourceloader: Combine base modules and page modules requests
Timo Tijhof [Thu, 12 Jul 2018 20:09:28 +0000 (13:09 -0700)]
resourceloader: Combine base modules and page modules requests

This commit implements step 4 and step 5 of the plan outlined at T192623.

Before this task began, the typical JavaScript execution flow was:

* HTML triggers request for startup module (js req 1).
* Startup module contains registry, site config, and triggers
  a request for the base modules (js req 2).
* After the base modules arrive (which define jQuery and mw.loader),
  the startup module invokes a callback that processes RLQ,
  which is what will request modules for this page (js req 3).

In past weeks, we have:

* Made mediawiki.js independent of jQuery.
* Spun off 'mediawiki.base' from mediawiki.js – for everything
  that wasn't needed for defining `mw.loader`.
* Moved mediawiki.js from the base module request to being embedded
  as part of startup.js.

The concept of dependencies is native to ResourceLoader, and thanks to the
use of closures in mw.loader.implement() responses, we can download any
number of interdependant modules in a single request (or parallel requests).
Then, when a response arrives, mw.loader takes care to pause or resume
execution as-needed. It is normal for ResourceLoader to batch several modules
together, including their dependencies.

As such, we can eliminate one of the two roundtrips required before a
page can request modules. Specifically, we can eliminate "js req 2" (above),
by making the two remaining base modules ("jquery" and "mediawiki.base") an
implied dependency for all other modules, which ResourceLoader will naturally
fetch and execute in the right order as part of the batch request.

Bug: T192623
Change-Id: I17cd13dffebd6ae476044d8d038dc3974a1fa176

5 years agosearch: Use self::class instead of __CLASS__ in SearchResultSet
Timo Tijhof [Wed, 8 Aug 2018 00:08:37 +0000 (01:08 +0100)]
search: Use self::class instead of __CLASS__ in SearchResultSet

For ease of understanding, use the same technique for both
sides of the comparison. Follows-up c2a308075f.

Change-Id: I66475fd4baaa6ab7cd24ad884e9fe01a1cd30d9f

5 years agoFix comma in Tajik Cyrillic dates
jhsoby [Tue, 7 Aug 2018 23:43:53 +0000 (01:43 +0200)]
Fix comma in Tajik Cyrillic dates

Changed from Arabic comma (،) to Latin comma (,).

Bug: T200367
Change-Id: I07eeb83f59c2068b9c8a9906b7567d162ccd1504

5 years agoAdd numeral conversion for Saraiki
jhsoby [Tue, 7 Aug 2018 23:22:47 +0000 (01:22 +0200)]
Add numeral conversion for Saraiki

Add support for Easten Arabic numerals for the
Saraiki language.

Bug: T201471
Change-Id: I75769099fe7fbab93bd7833cd457865a39fca033

5 years agoMerge "mediawiki.Title: Remove unnecessary type check on private function"
jenkins-bot [Tue, 7 Aug 2018 23:19:19 +0000 (23:19 +0000)]
Merge "mediawiki.Title: Remove unnecessary type check on private function"

5 years agoMerge "Fix import logging"
jenkins-bot [Tue, 7 Aug 2018 22:49:05 +0000 (22:49 +0000)]
Merge "Fix import logging"

5 years agoMerge "easydeflate.js: Use LF instead of CRLF as newline"
jenkins-bot [Tue, 7 Aug 2018 22:43:21 +0000 (22:43 +0000)]
Merge "easydeflate.js: Use LF instead of CRLF as newline"

5 years agoMerge "EditPage: Declare 'mediawiki.toolbar' needed for inline script"
jenkins-bot [Tue, 7 Aug 2018 22:10:59 +0000 (22:10 +0000)]
Merge "EditPage: Declare 'mediawiki.toolbar' needed for inline script"

5 years agoMerge "startup: Add support for module-requirement to RLQ"
jenkins-bot [Tue, 7 Aug 2018 21:33:29 +0000 (21:33 +0000)]
Merge "startup: Add support for module-requirement to RLQ"

5 years agoMerge "Remove @override annotation"
jenkins-bot [Tue, 7 Aug 2018 21:14:34 +0000 (21:14 +0000)]
Merge "Remove @override annotation"

5 years agoMerge "Do not generate negative page counts in dump"
jenkins-bot [Tue, 7 Aug 2018 20:44:35 +0000 (20:44 +0000)]
Merge "Do not generate negative page counts in dump"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 7 Aug 2018 20:04:49 +0000 (22:04 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I8aa27c80578e4a84f8678a15a014ccfa9134323f

5 years agoMerge "resourceloader: Give module eval the ContentSecurityPolicy nonce"
jenkins-bot [Tue, 7 Aug 2018 19:36:32 +0000 (19:36 +0000)]
Merge "resourceloader: Give module eval the ContentSecurityPolicy nonce"

5 years agoMerge "Updating CREDITS (MW contributors) file"
jenkins-bot [Tue, 7 Aug 2018 19:20:04 +0000 (19:20 +0000)]
Merge "Updating CREDITS (MW contributors) file"

5 years agoEditPage: Declare 'mediawiki.toolbar' needed for inline script
Timo Tijhof [Tue, 7 Aug 2018 18:45:10 +0000 (19:45 +0100)]
EditPage: Declare 'mediawiki.toolbar' needed for inline script

Switch from passing a plain function to RLQ that calls depends
on using() from 'mediawiki.base' and 'jquery', to using the new
array format introduced in Ica7bb9c3bdb (T192623).

This ensures the code will keep after we change the fact that
RLQ is blocked by base modules.

Bug: T192623
Change-Id: Id50e6dcc28c13b021d8395a2da0d83b46f88e18c

5 years agoMerge "Fix incorrect method name"
jenkins-bot [Tue, 7 Aug 2018 18:47:53 +0000 (18:47 +0000)]
Merge "Fix incorrect method name"

5 years agoMerge "Avoid ChronologyProtector warnings in the web upgrader"
jenkins-bot [Tue, 7 Aug 2018 18:47:47 +0000 (18:47 +0000)]
Merge "Avoid ChronologyProtector warnings in the web upgrader"

5 years agostartup: Add support for module-requirement to RLQ
Timo Tijhof [Tue, 7 Aug 2018 17:28:44 +0000 (18:28 +0100)]
startup: Add support for module-requirement to RLQ

* Add more inline documentation.

* Use [0] instead of needless 'length'. (Optimisation)

* Don't lazy-create NORLQ as empty array only to dereference
  it two statements later. (Optimisation)

* Add support for a secondary signature to RLQ.push.

  The existing signature is a plain callback function that is
  execute immediately after startup.

  The new signature is an array of `[ string|Array, Function ]`
  where the first value is required module(s), and
  the second value is the callback function.

  startup.js will leave the second form in the array, processing
  them instead in 'mediawiki.base'.

This change is needed before I17cd13dffebd6a (T192623), which
will remove the undocumented behaviour of RLQ callbacks firing
only after base modules arrive, which means we need to provide
authors of inline scripts an alternate means of scheduling
callbacks for after 'jquery' and/or 'mediawiki.base' arrive.

Bug: T192623
Change-Id: Ica7bb9c3bdb77d96ca2e01530a76f7ca448acdb8

5 years agoMerge "Replace @remarks by @note"
jenkins-bot [Tue, 7 Aug 2018 18:00:58 +0000 (18:00 +0000)]
Merge "Replace @remarks by @note"

5 years agoMerge "Remove @abstract annotation"
jenkins-bot [Tue, 7 Aug 2018 17:39:28 +0000 (17:39 +0000)]
Merge "Remove @abstract annotation"

5 years agoMerge "Whitelist phpcs Squiz.Scope.MemberVarScope in PHPVersionCheck"
jenkins-bot [Tue, 7 Aug 2018 17:31:09 +0000 (17:31 +0000)]
Merge "Whitelist phpcs Squiz.Scope.MemberVarScope in PHPVersionCheck"

5 years agoMerge "Remove @uses annotation from XhprofDataTest"
jenkins-bot [Tue, 7 Aug 2018 17:00:08 +0000 (17:00 +0000)]
Merge "Remove @uses annotation from XhprofDataTest"

5 years agoresourceloader: Give module eval the ContentSecurityPolicy nonce
Brian Wolff [Mon, 2 Jul 2018 06:19:43 +0000 (06:19 +0000)]
resourceloader: Give module eval the ContentSecurityPolicy nonce

Previously domEval didn't have CSP nonces, causing it to violate
the policy.

Also removes the meta tag scheme, as I could not make it compatible
with how RL storage works using domEval instead of real eval() and
it didn't provide much protection anyways.

Bug: T196923
Change-Id: I3cd2d7cc295c39b498d0bf37915d4ba167fdd48c

5 years agoFix incorrect method name
Aryeh Gregor [Mon, 6 Aug 2018 17:33:35 +0000 (20:33 +0300)]
Fix incorrect method name

getTimestamp() returns the timestamp of the revision, and as far as I
can tell that's null here, presumably because we haven't saved the
content and thus there is no revision. getCacheTime() returns the time
when the page was parsed, which is probably what we want.

Change-Id: I7dc446800656236f6ecc872a65e620881e434c54

5 years agoMerge "Add safeguard against loading content across wikis."
jenkins-bot [Tue, 7 Aug 2018 12:32:28 +0000 (12:32 +0000)]
Merge "Add safeguard against loading content across wikis."

5 years agoWhitelist phpcs Squiz.Scope.MemberVarScope in PHPVersionCheck
Umherirrender [Tue, 7 Aug 2018 10:39:46 +0000 (12:39 +0200)]
Whitelist phpcs Squiz.Scope.MemberVarScope in PHPVersionCheck

The class supports php4 and the visibility private does not work there.

Change-Id: I9cbffe437a1d1f4243f0b70bd881cdc8b8257537

5 years agoRemove @abstract annotation
Umherirrender [Tue, 7 Aug 2018 10:16:24 +0000 (12:16 +0200)]
Remove @abstract annotation

Doxygen does not know about this annotation

Change-Id: I4ad8f81d92574f1e3d91581627ec753f6dd1473d

5 years agoRemove @override annotation
Umherirrender [Tue, 7 Aug 2018 10:14:48 +0000 (12:14 +0200)]
Remove @override annotation

Doxygen does not know about this annotation

Change-Id: I5a2cac83899acd6954caba16da5023fe1ce09c50

5 years agoReplace @remarks by @note
Umherirrender [Tue, 7 Aug 2018 10:12:13 +0000 (12:12 +0200)]
Replace @remarks by @note

@remarks is uncommon and blacklist in phpcs

Change-Id: Ia21f340ad75f0f007fea8b1b79e16ab889a74d0c

5 years agoRemove @uses annotation from XhprofDataTest
Umherirrender [Tue, 7 Aug 2018 10:07:00 +0000 (12:07 +0200)]
Remove @uses annotation from XhprofDataTest

The use of a class is visible by the code or @covers

Change-Id: I1acec60da4b524c171686402a01424d66e9fc99f

5 years agoLogEventsList: Stop showing deprecation warning when $input is empty
Prateek Saxena [Tue, 7 Aug 2018 05:14:55 +0000 (10:44 +0530)]
LogEventsList: Stop showing deprecation warning when $input is empty

Follows-up on I697e158887fcca1da88763a4c929a981d9211490

Bug: T201006
Change-Id: I140cde3f71e2bd8106f0c0ce7da1ec822a8da072

5 years agoRemexCompatMunger: Don't call endTag() in case B/b
Tim Starling [Mon, 6 Aug 2018 02:30:51 +0000 (12:30 +1000)]
RemexCompatMunger: Don't call endTag() in case B/b

This was naïve, the linked bug documents a case where endTag() was
called despite children of the p-wrap still being in TreeBuilder's
stack. Instead, wait for the parent of the p-wrap to have endTag()
called on it, I've submitted a patch which will clean up the node in
that case.

Bug: T200827
Change-Id: I34694813eace9cadabf2db8f9ccca83d1368cfad

5 years agoMerge "Make maintenance scripts fail on unknown parameters"
jenkins-bot [Tue, 7 Aug 2018 03:31:19 +0000 (03:31 +0000)]
Merge "Make maintenance scripts fail on unknown parameters"

5 years agoobjectcache: add "epoch" parameter to WANObjectCache
Aaron Schulz [Wed, 11 Jul 2018 21:29:51 +0000 (22:29 +0100)]
objectcache: add "epoch" parameter to WANObjectCache

This can be used to discard all values before a certain point in
time, such as periods of severe network problems or misconfiguration
that resulted in missed purges.

Change-Id: I612db8f91a5960b912e9f35645a3d3872df47460

5 years agoRemove special collation for Northern Sami
jhsoby [Mon, 6 Aug 2018 23:20:14 +0000 (01:20 +0200)]
Remove special collation for Northern Sami

This removes the special collation for Northern Sami
that was added in 396007, when UCA support for Northern
Sami was not yet in MediaWiki. Now it is, so this
is no longer needed.

Bug: T182431
Change-Id: I760eb7ae8bf92f0ac93b5fca5cb69148a28d8f6f

5 years agoMerge "Do not return invalid hash from ApiStashEdit"
jenkins-bot [Mon, 6 Aug 2018 21:17:26 +0000 (21:17 +0000)]
Merge "Do not return invalid hash from ApiStashEdit"

5 years agoDo not return invalid hash from ApiStashEdit
Aryeh Gregor [Mon, 6 Aug 2018 16:54:04 +0000 (19:54 +0300)]
Do not return invalid hash from ApiStashEdit

If we were rate-limited, we don't store a new hash, so we shouldn't
return a new one.  If we received a hash from the client, however, that
should still be valid, so we can return it.

Change-Id: Ifc37ae044172b8838fee15d539b076a0d0f02f22

5 years agoeasydeflate.js: Use LF instead of CRLF as newline
Fomafix [Mon, 6 Aug 2018 20:41:08 +0000 (22:41 +0200)]
easydeflate.js: Use LF instead of CRLF as newline

Also add a newline at the end of the file.

Change-Id: I4c2c7814d16f066553faaaa7f0b98275a294b7c0

5 years agomediawiki.util: Remove deprecated noop function mw.util.init()
Fomafix [Mon, 6 Aug 2018 17:26:12 +0000 (19:26 +0200)]
mediawiki.util: Remove deprecated noop function mw.util.init()

The function mw.util.init() is since 06a0dec0 (Release 1.30) a
deprecated no-op function.

Change-Id: Ie3806e7fba0e63a75e9a830b2eb4485011e43cf1

5 years agoMerge "Clean up param handling in ApiStashEdit"
jenkins-bot [Mon, 6 Aug 2018 20:31:59 +0000 (20:31 +0000)]
Merge "Clean up param handling in ApiStashEdit"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 6 Aug 2018 19:59:15 +0000 (21:59 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I88c9666f85d861c8a55aadd8d9476a27835ba777

5 years agoMake maintenance scripts fail on unknown parameters
Bill Pirkle [Thu, 2 Aug 2018 20:10:31 +0000 (15:10 -0500)]
Make maintenance scripts fail on unknown parameters

Passing parameters not registered via standard mechanisms
(addOption/$optionsWithArgs/$optionsWihtoutArgs) will now
cause an error, unless, the script opts out via the new
setAllowUnregisteredOptions/$allowUnregisteredOptions.

Bug: T110209
Change-Id: I21957837f10852169ca3e1eeca9bf1f4052f8c0b

5 years agoUpdating CREDITS (MW contributors) file
Alangi Derick [Mon, 6 Aug 2018 17:38:18 +0000 (18:38 +0100)]
Updating CREDITS (MW contributors) file

Change-Id: I365f533b2bade1f9f2db412bc7815321e97dab2e

5 years agoClean up param handling in ApiStashEdit
Aryeh Gregor [Mon, 6 Aug 2018 16:53:45 +0000 (19:53 +0300)]
Clean up param handling in ApiStashEdit

It doesn't make sense to submit both stashedtexthash and text, so
requireOnlyOneParameter() is correct.  This simplifies the code and
gives a more helpful error message. (Previously if both parameters were
passed, we would ignore text unless stashedtexthash was empty, in which
case we would ignore it.)

Change-Id: I306b15eefb6fd4379a3eed88d84113c2e43c4a95

5 years agoMerge "Use localised language name for Santali"
jenkins-bot [Mon, 6 Aug 2018 18:20:22 +0000 (18:20 +0000)]
Merge "Use localised language name for Santali"

5 years agoRemove comment about fixed codesniffer bug
Umherirrender [Mon, 6 Aug 2018 15:38:47 +0000 (17:38 +0200)]
Remove comment about fixed codesniffer bug

Fix was part of 21.0.0 (or earlier)

Change-Id: I378aea5cac5a2191e859c89a781e64bf647841d7

5 years agoMerge "Fix param doc of MysqlMaintenance::runMysql"
jenkins-bot [Mon, 6 Aug 2018 15:20:52 +0000 (15:20 +0000)]
Merge "Fix param doc of MysqlMaintenance::runMysql"

5 years agoUse localised language name for Santali
MarcoAurelio [Mon, 6 Aug 2018 09:44:54 +0000 (09:44 +0000)]
Use localised language name for Santali

Change-Id: I53f36eb81c1a446c9424074a3993115b55f496df

5 years agoMerge "Change name of Santali to localized version"
jenkins-bot [Mon, 6 Aug 2018 13:46:30 +0000 (13:46 +0000)]
Merge "Change name of Santali to localized version"

5 years agoAdd safeguard against loading content across wikis.
daniel [Mon, 6 Aug 2018 12:31:04 +0000 (14:31 +0200)]
Add safeguard against loading content across wikis.

The new MCR schema enables cross-wiki loading of page content,
but this mechanism doesn't work as long as the new code is reading from
the old schema. This is what caused T201194.

Bug: T201194
Change-Id: I58af7a9e02780c55cd8fab20f19be36a0fa804da

5 years agoMerge "Add language support for Western Armenian (hyw)"
jenkins-bot [Mon, 6 Aug 2018 13:30:58 +0000 (13:30 +0000)]
Merge "Add language support for Western Armenian (hyw)"

5 years agoUse log_page as the rc_cur_id for log entries in rebuildrecentchanges.php
GeoffreyT2000 [Fri, 9 Feb 2018 01:22:23 +0000 (17:22 -0800)]
Use log_page as the rc_cur_id for log entries in rebuildrecentchanges.php

Using the log_page field as the rc_cur_id would make looking in the page table for the page_id entirely redundant.

Bug: T186840
Change-Id: I8b013f89749a94f9c795f29a78535dcf33112905

5 years agoAdd language support for Western Armenian (hyw)
MarcoAurelio [Mon, 6 Aug 2018 10:38:14 +0000 (12:38 +0200)]
Add language support for Western Armenian (hyw)

 * Language name: Western Armenian <https://www.ethnologue.com/language/hyw>.
 * Local version: արեւմտահայերէն
 * ISO639-3: hyw <https://iso639-3.sil.org/code/hyw>.
 * Fallback: Armenian (hy).

Bug: T201276
Change-Id: Ic76d7a9a1fa8541fd422a4287044de4daaa6665d

5 years agoSet the previous size for page creations to zero in rebuildrecentchanges.php
GeoffreyT2000 [Wed, 21 Feb 2018 00:32:03 +0000 (16:32 -0800)]
Set the previous size for page creations to zero in rebuildrecentchanges.php

The rebuildrecentchanges.php script should set the previous size for page creations to zero, not null, in order to make the new page's size actually appear on Special:RecentChanges.

Bug: T187842
Change-Id: I9823c5fe6f0503208b347e1ece9a1f894dba24c3

5 years agoFix param doc of MysqlMaintenance::runMysql
Umherirrender [Mon, 6 Aug 2018 08:58:53 +0000 (10:58 +0200)]
Fix param doc of MysqlMaintenance::runMysql

Add missing var name and type

Change-Id: I26c84723ee28b21f6b9b654d9507ed680c07055a

5 years agoMerge "Clarify IDatabase docs for upsert() and replace()"
jenkins-bot [Mon, 6 Aug 2018 05:10:01 +0000 (05:10 +0000)]
Merge "Clarify IDatabase docs for upsert() and replace()"

5 years agoChange name of Santali to localized version
Martin Urbanec [Sun, 5 Aug 2018 16:30:28 +0000 (18:30 +0200)]
Change name of Santali to localized version

Bug: T198400
Change-Id: Id2bbcfebf32903c4d8882e2b4f18f37a8a5c3366

5 years agomediawiki.Title: Remove unnecessary type check on private function
Fomafix [Sat, 4 Aug 2018 17:43:06 +0000 (19:43 +0200)]
mediawiki.Title: Remove unnecessary type check on private function

The private function text() is always called with type string.

Change-Id: I5c473215eae4d6da5070478e36156740c1a0a11e

5 years agoGive a bit of love to EditPage docstrings
Adam Wight [Thu, 5 Jul 2018 12:41:54 +0000 (14:41 +0200)]
Give a bit of love to EditPage docstrings

Change-Id: I9dea576f0cf5ba0ffe1cfba81bfe519e2ae19eeb

5 years agoMerge "Don't pass false as a wikiId to invalidateModuleCache()"
jenkins-bot [Fri, 3 Aug 2018 23:12:59 +0000 (23:12 +0000)]
Merge "Don't pass false as a wikiId to invalidateModuleCache()"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 3 Aug 2018 20:13:21 +0000 (22:13 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I97fd57935a2353b8bce000d925b5605ec0f5998b

5 years agoDon't pass false as a wikiId to invalidateModuleCache()
daniel [Fri, 3 Aug 2018 12:47:29 +0000 (14:47 +0200)]
Don't pass false as a wikiId to invalidateModuleCache()

Using false to represent the local wiki is supported in many places in core,
but not in invalidateModuleCache

Bug: T199416
Change-Id: I5cb93c173295261bf5fcf6c77c197a80c4aac1a2

5 years agoMerge "Fix article counting logic in DerivedPageDataUpdater"
jenkins-bot [Fri, 3 Aug 2018 11:57:15 +0000 (11:57 +0000)]
Merge "Fix article counting logic in DerivedPageDataUpdater"

5 years agoFix article counting logic in DerivedPageDataUpdater
Gergő Tisza [Wed, 1 Aug 2018 12:22:37 +0000 (14:22 +0200)]
Fix article counting logic in DerivedPageDataUpdater

Use old state of the page if we have it.

Bug: T200823
Change-Id: Iff29731a127ef32baec5970dcbc25a0a5c3eb4d9

5 years agoComments and code cleanup in OutputPage
Aryeh Gregor [Thu, 2 Aug 2018 18:26:55 +0000 (21:26 +0300)]
Comments and code cleanup in OutputPage

Change-Id: I8c44f30801792e8b84ab3d556cb5b1b5feb9baf3

5 years agoMerge "Update Parser to use ContentLanguage"
jenkins-bot [Fri, 3 Aug 2018 04:52:25 +0000 (04:52 +0000)]
Merge "Update Parser to use ContentLanguage"

5 years agoMerge "Update MagicWord to use ContentLanguage"
jenkins-bot [Fri, 3 Aug 2018 04:47:20 +0000 (04:47 +0000)]
Merge "Update MagicWord to use ContentLanguage"

5 years agoUpdate Parser to use ContentLanguage
Aryeh Gregor [Thu, 26 Jul 2018 12:37:13 +0000 (15:37 +0300)]
Update Parser to use ContentLanguage

Bug: T200246
Change-Id: Ie54677706ec175189c3ff52342a9d8ac2f5d90d8

5 years agoDo not generate negative page counts in dump
Stanislav Malyshev [Fri, 3 Aug 2018 01:01:11 +0000 (18:01 -0700)]
Do not generate negative page counts in dump

Due to T201119, some counts are not in sync. We are assuming
that in this case page count is just 0.

Change-Id: Iffd24270db6d852839d6922aa492c1975bf185e0

5 years agoMerge "Document cross-wiki cache sharing logic."
jenkins-bot [Thu, 2 Aug 2018 20:42:22 +0000 (20:42 +0000)]
Merge "Document cross-wiki cache sharing logic."

5 years agoMerge "Introduce RevisionStoreFactory & Tests"
jenkins-bot [Thu, 2 Aug 2018 20:39:54 +0000 (20:39 +0000)]
Merge "Introduce RevisionStoreFactory & Tests"

5 years agoMerge "Fix PerDbnameStatsdDataFactory metric prefix again"
jenkins-bot [Thu, 2 Aug 2018 20:35:13 +0000 (20:35 +0000)]
Merge "Fix PerDbnameStatsdDataFactory metric prefix again"

5 years agoMerge "Special:NewPages: Add hidden fields using HTMLForm"
jenkins-bot [Thu, 2 Aug 2018 20:07:54 +0000 (20:07 +0000)]
Merge "Special:NewPages: Add hidden fields using HTMLForm"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 2 Aug 2018 19:53:50 +0000 (21:53 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I9da106f20435128ca449c1a6785c6ecf2bb42a2d