Commit graph

906 commits

Author SHA1 Message Date
jenkins-bot
670cd4802b Merge "Move PrefixSearch classes to own files" 2019-03-28 21:42:50 +00:00
Krinkle
22476334be Merge "resourceloader: Improve test cases for MessageBlobStore" 2019-03-28 20:37:42 +00:00
jenkins-bot
26fbddd78c Merge "Move HistoryBlob classes to own files" 2019-03-28 10:55:48 +00:00
Timo Tijhof
853a291903 resourceloader: Improve test cases for MessageBlobStore
Move source code to includes/resourceloader to match
test case. This is part of ResourceLoader and not meant
to be used elsewhere.

Merge two similar test cases for getting blobs and fetching
messages which were doing the same thing.

Rewrite the test names to be a better reflection of the stories
they test, add comments for why, and re-order them to put related
tests together.

Move test-utilities to the bottom and make them actually private.

Change-Id: I7a437eebf3ba6a722e286dfe77c2f9fe49ad222f
2019-03-27 23:53:23 +00:00
Umherirrender
8d5a8fb181 Move PrefixSearch classes to own files
Move all into search subfolder

Change-Id: I4097b9745d22545afe6761da1fa67cf98af5b811
2019-03-27 21:40:33 +01:00
jenkins-bot
38760fe587 Merge "resources: Make manageForeignResources a regular maint script" 2019-03-25 20:04:08 +00:00
Umherirrender
7ede3c619a Move HistoryBlob classes to own files
Move all into own subfolder

Change-Id: Iccf1bb9a2c8927c1b4dc0952d59d745109a71f76
2019-03-25 20:29:47 +01:00
Umherirrender
c71a50e2a0 Rename PoolCounter_Stub to PoolCounterNull
Also move to own file
Remove "Stub", because it refers a php concept,
which is not used here

Change-Id: Ife952901b5ad8e4a408d229ee72de953a9acc220
2019-03-24 22:44:46 +01:00
Timo Tijhof
f8fcff31aa resources: Make manageForeignResources a regular maint script
The maintenance script was previously in a subdirectory which
is a bit unusual. It's now a regular maintenance script,
with the YAML file in a more discoverable place as well.

Change-Id: I38690f23dbe89839bee0e1d43ecfd68adeb19c0f
2019-03-24 20:57:46 +00:00
jenkins-bot
b9789f9c56 Merge "add lbzip2 output processor for exports" 2019-03-23 23:35:29 +00:00
Ariel T. Glenn
b01ff36537 add lbzip2 output processor for exports
Bug: T214293
Change-Id: I98e26b833df473bbeb3dc1b881f428174d776b64
2019-03-24 01:20:04 +02:00
jenkins-bot
e548897cab Merge "Move class RevisionListBase and friends to own file" 2019-03-23 22:37:10 +00:00
Timo Tijhof
6b7ddf9c9b Revert "Split out new RefreshSecondaryDataUpdate class"
This reverts commits a1f7fd3ada, 0ef02cd018.

Bug: T218456
Change-Id: I9bbea3d13460ed44755d77fc61ff23fb906cf71e
2019-03-19 14:51:27 +00:00
Piotr Miazga
fd24be4fc5 Provide a Taggable interface
The Taggable interface defines how to tag objects in MediaWiki.
For now there are only two Taggable objects:
 - RecentChange
 - ManualLogEntries

This interface should be used in places where we want to optionally
tag things, for example:
 We want to tag all mobile web actions with 'web mobile edit'.

With that interface, we will be able to expect a Taggable object,
and call `addTags()` when we need to, without having a special check
to verify is it RecentChange, or is it ManualLogEntry. We will only
expect a Taggable object.

Additionally, added @deprecated note to ManualLogEntries::setTags()
as each call to this method will override all previous tags. This
action can be harmfull to parts of code that conditionally add tags.
If object was tagged in some way, we should preserve those tags.

If there are any special cases, where we want to override all tags,
we should provide `resetTags()` method.

Bug: T215675
Change-Id: Ia4c019db8ca6f37ce0f86bf7d134d6f1713daf56
2019-03-18 23:10:06 +01:00
Timo Tijhof
4677392718 Remove wgSitesCacheFile and rebuildSitesCache.php (unused)
This seems to have been intended as optimization for SiteStore,
but was never used as far as I can tell. Instead, SiteStore is
already cached via LocalServerCache (APC).

Keep the FileBasedSiteLookup class for one release cycle in case
third parties not indexed by MediaWiki Codesearch are using it.

== History

* 2013: Report of high memcached usage by Wikibase via SiteStore.
* 2014: Lazy-load the data in Wikibase (d3f2e99cb6).
* 2014: Implement the file-based cache (via T47532 and 90f6efc360).
* 2015: Use local-server cache (APC), per T58602.

The file-based code was never used. The related task marked
invalid (T47532).

Change-Id: I8e2d9edcf3880149f824cc3de37793ca57435b49
2019-03-15 20:03:44 +00:00
Aaron Schulz
a1f7fd3ada Split out new RefreshSecondaryDataUpdate class
Make DerivedPageDataUpdater bundle all the related DataUpdate tasks
on page change with a RefreshSecondaryDataUpdate wrapper. If one of
the DataUpdate tasks fails, then the entire bundle of updates can be
re-run in the form of enqueueing a RefreshLinksJob instance (these
jobs are idempotent). If several of the bundled tasks fail, it is easy
for DeferredUpdates to know that only one RefreshLinksJob should be
enqueued.

The goal is to make DataUpdate tasks more reliable and resilient.
Most of these deferred update failures are due to ephemeral problems
like lock contention. Since the job queue is already able to reliably
store and retry jobs, and the time that a regular web request can spend
in post-send is more limited, it makes the most sense to just enqueue
tasks as jobs if they fail post-send.

Make LinkUpdate no longer defined as enqueueable as RefreshLinksJob
since they are not very congruent (LinksUpdate only does some of the
work that RefreshLinksJob does). Only the wrapper, with the bundle of
DataUpdate instances, is congruent to RefreshLinksJob.

This change does not itself implement the enqueue-on-failure logic
in DeferredUpdates, but is merely a prerequisite.

Bug: T206288
Change-Id: I191103c1aeff4c9fedbf524ee387dad9bdf5fab8
2019-03-15 17:14:50 +00:00
Umherirrender
3265bbb184 Move class RevisionListBase and friends to own file
Change-Id: I2c3675286bef948585ee0364288081aad9fd4376
2019-03-14 19:50:40 +01:00
jenkins-bot
c4022f1e98 Merge "Move class HistoryPager to own file" 2019-03-10 03:25:36 +00:00
Umherirrender
9d5e2fd751 Move class RangeDifference to own file
Change-Id: I5262c7484017a0d920cc24297515d5946f614ee6
2019-03-08 23:29:14 +01:00
Umherirrender
ba03d8f32a Move CacheDependency classes to own files
Change-Id: Icacf36674f10fa19a09499d68d596d5e2cc235f0
2019-03-08 22:27:29 +01:00
Umherirrender
11ce0ab99b Move class HistoryPager to own file
Change-Id: Ie12e79e6f32225442b5bd794826f8c760b2c02d6
2019-03-08 21:56:38 +01:00
Umherirrender
d515f784e5 Move class JobQueueAggregatorNull to own file
Change-Id: Icb76f25eb9c2a26c91ba564a78edd4c07b49b944
2019-03-08 20:19:26 +01:00
James D. Forrester
3f717984c1 Drop AuthPlugin and related code, deprecated in 1.27
Bug: T215843
Depends-On: Ie49709faa6f67b0a31bd546823d29dbfea0a70eb
Depends-On: If8109dbfdeeb88a6265f4cd79d1ae81bff48d934
Depends-On: I36b195fa2d6c23a76631ebaf869c787e44427d60
Depends-On: Iaa171b085fde331eab7d85c7de74523e27fc625a
Change-Id: I330b30d6582034a233fed204c0680b1ce84eec6e
2019-03-05 08:23:14 +00:00
Umherirrender
7edafc29c6 Move specialpage redirects related classes to own files
Change-Id: Ibddbb0c4e40fff310b1720ec9c72f2683cc93f54
2019-03-03 17:59:24 +00:00
Umherirrender
8d52cf3d12 Move FauxResponse class to own file
Similar to FauxRequest

Change-Id: Ia9e4e7287ade605899d935db7c9f1f017e0bcb85
2019-03-02 18:55:13 +00:00
Amir Sarabadani
f8efd21621 Fix lowercase in namespace of LogCapturingSpi.php
Basically turning Mediawiki to MediaWiki as all other classes exist
in that namespace

Bug: T217128
Change-Id: I95039a1a54c9900a2f2414b5a6ccce5fb6e5e612
2019-02-26 13:17:09 +01:00
jenkins-bot
dd35e1a469 Merge "Print logs generated during unit test when test fails" 2019-02-22 08:01:16 +00:00
Max Semenik
292e13edc5 Add support for Argon2 password hashing
So far, everything we had was vulnerable to newest advances in
GPU cracking and timing side-channel attacks. Argon2 was designed
specifically to address these problems.

Unfortunately, PHP support is lagging, with some builds missing
Argon2id or even Argon2i.

Change-Id: Ifdf648f5d8a734a663e630286724a6d0a87c7510
2019-02-10 02:20:52 -08:00
Matěj Suchánek
93aeb14e08 Move migrateActors.php to includes
This way it can be subclassed in extensions, like AbuseFilter
(Ic755526d5f989c4a66b1d37527cda235f61cb437).

Bug: T188180
Change-Id: Idf320232011c72e39267b1f3c39848aea35d37fe
2019-02-09 11:42:38 +01:00
James D. Forrester
edba8aaf5a Drop SiteSQLStore, deprecated in 1.27, unused
Change-Id: I6743417c3aafbba59ac02350e0190fbf688a5a40
2019-02-08 17:43:33 -08:00
Roan Kattouw
1c7c9bdf1f Use packageFiles feature to replace special-purpose RL modules
For config vars, add a virtual package file called 'config.js', and use
require( './config.js' ) in the module. For most data modules, add a
virtual package file called 'data.js', use require( './data.js' ) in the
module. Where needed, add wrapper files that put the data in the
relevant global object and in module.exports.

LanguageDataModule is the only special-purpose module not being removed
in this commit, because it uses languageScripts, and those are not
compatible with packageFiles (yet).

Also merge mediawiki.ForeignStructuredUpload.config into
mediawiki.ForeignStructuredUpload, since that was the only thing that
used it.

Change-Id: I203d4e3ecdeeeb16729eba2dcf40d11a41d2e582
2019-02-09 00:10:48 +00:00
Erik Bernhardson
56ffbc2a4e Print logs generated during unit test when test fails
When a unit test fails it is possible, perhaps even likely in some
cases, that some code that was run logged useful information about
how that failure came to be.

Help people out, tell them what happened!

Change-Id: I30bbc31799a65024868678d052fec9aafacc1aff
2019-02-06 14:43:32 -08:00
Umherirrender
b0a75622d3 Move upload stash related exceptions to own files
Change-Id: I23e81af2f1bf73f5cd78a01bcc2fcebb4c4ea038
2019-02-06 22:22:01 +01:00
Umherirrender
fa29c3c09d Move exceptions JobQueueError to own file
Change-Id: Ibd67358cb7a14497dce8a3982ceba3b4300bdd65
2019-02-06 19:39:20 +01:00
Umherirrender
6ebe568c4e Remove deprecated class SquidUpdate
Change-Id: Iac53864296990befe7c573a29dd2f35aca52a79e
2019-02-05 20:35:05 +01:00
Umherirrender
1c851623b0 Move interface ICacheHelper to own class
Change-Id: I6f2b6507b0038f0988e4db5566ebddbe0d734a70
2019-02-05 20:04:12 +01:00
Umherirrender
1ca06c64af Move interface IJobSpecification to own file
Change-Id: Iabb10f8473b2ef0f4aea2aaca0dad39745028ece
2019-02-04 21:04:12 +01:00
Umherirrender
5d2e39401d Move interface ILocalizedException to own file
Change-Id: I66429a89633a74a22999775214aa23ae189b837e
2019-02-01 20:05:30 +01:00
Kunal Mehta
951690c02e Rename tests/phpunit/includes/media files to match class names
The classes were renamed in 9bf39163, this updates the test cases to
match. Also take care of XCF while we're at it too.

Change-Id: Iaaeee93e496af6cdd610df5bc75302ecfe273f64
2019-01-29 23:21:13 -08:00
Bill Pirkle
e8cb9f5f83 http: Support callback functions in GuzzleHttpRequest
Provide backward compatibility for callback functions in
GuzzleHttpRequest, which was missing in T202110, and restore
GuzzleHttpRequest as the default provided by HttpRequestFactory.

Bug: T212175
Depends-On: I4b45e79d35252d13f714f3271b87301ca515121a
Change-Id: I60d1a034b44874f6d24a04058db264eeb565f5e1
2019-01-24 22:05:10 +00:00
jenkins-bot
c1436805cd Merge "Introduce multiselect widgets for namespaces" 2019-01-23 17:02:41 +00:00
jenkins-bot
f7ead5d3ca Merge "Better detection for old MS Office files" 2019-01-23 01:01:43 +00:00
Tim Starling
f12db38048 Better detection for old MS Office files
* Introduce MSCompoundFileReader, which reads the CFB directory and
  detects the file type from well-known names in the root directory
* Do not detect a ZIP file if the EOCDR is not at the end. Other
  containers, especially CFB files, may contain ZIP files embedded
  within them in the last 64KB, but this is not a security concern
  unless the EOCDR is exactly at the end of the file.

Bug: T40432
Change-Id: Id5b1a258ccf3c3c8951e32f6b7a5b1bafe941082
2019-01-23 09:23:17 +11:00
Thalia
ccbe9f3590 Introduce multiselect widgets for namespaces
Bug: T204986
Change-Id: Ie3916e2322d8b1a7effe9ba4604b596b568004e6
2019-01-22 12:48:42 +00:00
SamanthaNguyen
870831d40c htmlform: Move HTMLSelectLanguageField into includes/htmlform/fields
This was originally directly under includes/htmlform. This is
a specific type of field, so it should go here instead.

Follows-up d0c31ac988.

Change-Id: Iac196068ce2cbca063948bc78d21913482717d9a
2019-01-22 04:56:44 +00:00
Lucas Werkmeister
7585985a46 Fully extract services framework as a library
This code doesn’t use any MediaWiki-specific code, so rename
MediaWiki\Services to Wikimedia\Services and move it below libs/. (Of
course, this does not apply to the MediaWikiServices subclass.)

Class aliases are added to retain backwards compatibity for now.

Bug: T211608
Change-Id: Ic14ea28ef21c359695b309d4293dbaaf5deedc09
2019-01-16 17:31:05 +01:00
jenkins-bot
1c29f24dd5 Merge "Add special page class for disabling special pages" 2019-01-12 19:01:45 +00:00
Gergő Tisza
608879edbf Add special page class for disabling special pages
Similar to the ApiDisabled class, but for special pages.

Change-Id: Ib56860bc3f8a14fd332b775b1e7f50953641ee82
2019-01-12 18:46:36 +00:00
Sethakill
d0c31ac988 Convert Special:AllMessages to use OOUI
Moved form from pager and
added new HTMLSelectLanguageField.

Bug: T117749
Bug: T134425
Change-Id: I46dc6cc8f7ddf8552a726202df136cbbff66588c
2019-01-02 15:18:19 -08:00
jenkins-bot
f186496005 Merge "Add ProfilerExcimer" 2018-12-16 23:00:16 +00:00