Commit graph

92336 commits

Author SHA1 Message Date
daniel
46bb49dbfd SqlBlobStore: test caching behavior.
Something is going wrong with the way we use WANObjectCache in
getBlobBatch. This patch introduces a test case that should help narrow
down the cause.

Bug: T235188
Change-Id: I2d06c09609874440992e6c90d3ebfa15400ac302
2019-10-14 14:01:06 +00:00
Bill Pirkle
967988bd3e Core REST API handler for GET page history
Handler to return page history via the Core REST API.
Includes two parameters for pagination:
  older_than
  newer_than
Also includes a "filter" parameter with possible values:
  bot
  anonymous
  reverted

Bug: T231558
Bug: T231597
Change-Id: Ie35d8be6c96b468794f8acf80a5fb50e4cd17c3c
2019-10-09 09:23:54 -05:00
jenkins-bot
7b6c87a3cf Merge "Add userlink to IP ranges on Special:BlockList" 2019-10-09 11:41:53 +00:00
jenkins-bot
b932ac4bff Merge "tests: Fix MWHttpRequestTest covering the wrong class" 2019-10-09 10:45:48 +00:00
jenkins-bot
25a0c838d0 Merge "MWHttpRequest: Avoid usage of deprecated Http class methods" 2019-10-09 09:08:42 +00:00
Thiemo Kreuz
bcf3e1fdd2 tests: Fix MWHttpRequestTest covering the wrong class
Change-Id: I38d138fa3cf85cb0af305633a15a615069bf02c0
2019-10-09 09:56:14 +02:00
Derick Alangi
d573f0de1f MWHttpRequest: Avoid usage of deprecated Http class methods
Change-Id: Id0837874896708adf4a950d3bd74ae92f4908851
2019-10-09 09:55:42 +02:00
Translation updater bot
155e41c770 Localisation updates from https://translatewiki.net.
Change-Id: If1db2d48a1623bf74ce84db433005c58b78c23a9
2019-10-09 08:28:48 +02:00
Ammar
84380c8c9c Add userlink to IP ranges on Special:BlockList
This was previously removed because Special:Contributions could not show
contributions from IP ranges. It now does.

Bug: T233082
Change-Id: I2ec45807ca515a83309e8dbecce53840951e2d5f
2019-10-09 03:46:06 +01:00
jenkins-bot
35cbf23c4f Merge "Make wrapOldPasswords.php output old and new password types" 2019-10-09 01:38:34 +00:00
Reedy
ab8b7781fe Remove class_exists( 'LightnCandy' )
We can rely on composer making sure the library exists

Change-Id: I3dd12b4b4b6abc36c700ebb8a3bc0ac2d820a3fe
2019-10-09 01:17:11 +01:00
Max Semenik
f67396b510 Travis: test on PHP 7.4, allowing failures
Bug: T233012
Change-Id: I1dd85d290b787945e076efb0a4f511e159688e03
2019-10-08 23:50:49 +00:00
jenkins-bot
50476c4c62 Merge "MessagesCu: Fix invalid characters in namespace aliases" 2019-10-08 23:09:42 +00:00
jenkins-bot
9692797059 Merge "Make grammar transform cache an instance member" 2019-10-08 22:58:29 +00:00
jenkins-bot
a543d68c65 Merge "New LanguageFallback service" 2019-10-08 22:58:22 +00:00
jenkins-bot
8ff5a26c1a Merge "Services: Convert MWLBFactory's static to a const now HHVM is gone" 2019-10-08 22:32:23 +00:00
Aryeh Gregor
f23c4570e4 Make grammar transform cache an instance member
Normally there shouldn't be more than one Language object in existence
at a time because of $mLangObjCache, so there's no need for a
MapCacheLRU for grammar transformations. Just make it an instance member
of Language.

If someone directly called the Language constructor instead of
factory(), or meddled with $mLangObjCache, with one of the three
languages that have transforms defined, and called
getGrammarTransformations() on both distinct objects, this change could
result in duplication of an array of about 50 elements. I think the risk
is acceptable.

The change should be covered acceptably by existing tests for LanguageHe
and LanguageRu.  (There's not much to test.)

Bug: T201405
Change-Id: I483bafbbb7d109b670596f16381def9e3bd26d89
2019-10-08 22:24:22 +00:00
Aryeh Gregor
8c4f59db64 New LanguageFallback service
This replaces the static Language methods getFallbackFor(),
getFallbacksFor(), and getFallbacksIncludingSiteLanguage(). There is
100% unit and integration test coverage for the new class.

One deliberate functional change: I changed one place where we threw
MWException to InvalidArgumentException.

Bug: T201405
Depends-On: Ie7a89f6ed7d52a0bc01672019ff92e7ee105a1f3
Change-Id: I49222eb55f1feec5b1dcd40f364cffe0c8801855
2019-10-08 15:11:39 -07:00
Bartosz Dziewoński
a64779f7ef MessagesCu: Fix invalid characters in namespace aliases
In commit 5940aa6344 in 2008 (SVN r35745),
these were accidentally changed from U+F011 (a private use area character)
to U+0011 (a control character). The control characters are certainly
incorrect, as they can't even be used in MediaWiki page titles. Having
a private use area character here is surprising to me, but it was
apparently used since 2006 as a substitute for U+A657, which was only
introduced in Unicode 5.1 in April 2008, hence the aliases.

I noticed this problem when I was doing some work analyzing MediaWiki's
date formats, and my editor warned me that this is a "binary file" :)

Change-Id: I5df29b0072d6dec8dcb8c7492d8b9623c93fdbf3
2019-10-08 23:52:41 +02:00
jenkins-bot
0d8243f9c8 Merge "TextFormatterTest: Use mocks instead of manually creating classes" 2019-10-08 21:46:14 +00:00
jenkins-bot
dc29e36e7c Merge "Always $-prefix jQuery variable names" 2019-10-08 21:45:39 +00:00
jenkins-bot
3c69201ec3 Merge "eslint: Use correct global values, and use jquery rules in selenium tests" 2019-10-08 21:45:33 +00:00
Max Semenik
fb252d5565 TextFormatterTest: Use mocks instead of manually creating classes
Change-Id: I85cb709f277f37279f2edbe58a441b8a4043fb27
2019-10-08 21:32:25 +00:00
Aaron Schulz
450ea60c65 rdbms: clean up some DatabaseSqlite variables and break some lines
Change-Id: I3857b08ac86dbb5233210e33afdbdd9ef0a291fb
2019-10-08 21:20:11 +00:00
James D. Forrester
6898ba7232 Services: Convert MWLBFactory's static to a const now HHVM is gone
Change-Id: I2b5c77c304e03af31bc3f15f2e3f6002ca2f2647
2019-10-08 21:14:19 +00:00
jenkins-bot
52b44696ba Merge "Split some Language methods to LanguageNameUtils" 2019-10-08 21:10:07 +00:00
Reedy
fc602ec409 Make wrapOldPasswords.php output old and new password types
Change-Id: I7316c9cb0ad028da133448179599485e7f435ab9
2019-10-08 21:52:12 +01:00
Reedy
8631daae64 Disable flaky Selenium test
Bug: T226144
Change-Id: Ib49898617ba419f709b249ae9a05d9cb7b8e4e9d
2019-10-08 20:50:37 +00:00
jenkins-bot
bda408fa22 Merge "WikiPage: Remove unused protected method flattenRestrictions()" 2019-10-08 20:49:01 +00:00
jenkins-bot
7982ca36bc Merge "Services: Convert DefaultPreferencesFactory's static to a const now HHVM is gone" 2019-10-08 20:45:53 +00:00
jenkins-bot
66f65e3a22 Merge "Services: Convert BlobStoreFactory's static to a const now HHVM is gone" 2019-10-08 19:47:57 +00:00
jenkins-bot
8db7eb1139 Merge "Introduce a formatter service for block errors" 2019-10-08 19:42:53 +00:00
jenkins-bot
1bfa89189c Merge "Services: Convert PasswordReset's static to a const now HHVM is gone" 2019-10-08 19:33:29 +00:00
jenkins-bot
7ab1264617 Merge "Services: Convert LocalisationCache's static to a const now HHVM is gone" 2019-10-08 19:33:23 +00:00
jenkins-bot
667a7eb0c5 Merge "Services: Convert BlockManager's static to a const now HHVM is gone" 2019-10-08 19:33:16 +00:00
jenkins-bot
7167f04dbe Merge "Services: Convert PermissionManager's static to a const now HHVM is gone" 2019-10-08 19:07:33 +00:00
jenkins-bot
1ea56017d3 Merge "rdbms: rename $a => $rows in IDatabase and add Database::isMultiRowArray()" 2019-10-08 18:58:23 +00:00
Aaron Schulz
0350220e99 rdbms: rename $a => $rows in IDatabase and add Database::isMultiRowArray()
Change-Id: Ie98754539d1e722cfad2c36c06862344bc103208
2019-10-08 11:36:33 -07:00
James D. Forrester
17f3f9cee3 Services: Convert DefaultPreferencesFactory's static to a const now HHVM is gone
Change-Id: If24c5f120cb96311b50750c5b3022664dc6b20e5
2019-10-08 11:28:15 -07:00
James D. Forrester
4afe9030c2 Services: Convert BlobStoreFactory's static to a const now HHVM is gone
Change-Id: Ia319c881f0457fde71e355eca4873ac157e605d3
2019-10-08 11:27:22 -07:00
James D. Forrester
662b27776b Services: Convert PasswordReset's static to a const now HHVM is gone
Change-Id: I77e0d9ce86cf96824eb672d0f35c32b5f4c484be
2019-10-08 11:26:17 -07:00
jenkins-bot
76ddc23664 Merge "mediawiki.util: Remove 'mediawiki.RegExp' module alias" 2019-10-08 18:26:15 +00:00
James D. Forrester
ebac0247cf Services: Convert LocalisationCache's static to a const now HHVM is gone
Change-Id: If5c015debed7efc034613b976bc5292ac30036d7
2019-10-08 11:25:30 -07:00
James D. Forrester
40c35286cb Services: Convert BlockManager's static to a const now HHVM is gone
Change-Id: I01d6e18fc30bd61ba7ea5ce1c7c646524579c4ba
2019-10-08 11:24:22 -07:00
James D. Forrester
9cba9f8567 Services: Convert PermissionManager's static to a const now HHVM is gone
Change-Id: Ib75b6f5d6b3e793ddbce42951693d8c99e6b7e57
2019-10-08 11:23:08 -07:00
jenkins-bot
8685746269 Merge "Registration: Allow relative paths in config arrays, not just strings" 2019-10-08 18:04:46 +00:00
jenkins-bot
f708e8970b Merge "Clarify description of action=purge parameters" 2019-10-08 17:42:01 +00:00
jenkins-bot
3893325c03 Merge "resourceloader: Remove listing of "load.php" from Special:Version" 2019-10-08 17:41:54 +00:00
Matthias Mullie
095a8e5d8a Registration: Allow relative paths in config arrays, not just strings
The previous code to allow relative paths (via "path": true) was
limited to only string values, which led to needing a non-static
registration callback function.

Bug: T231855
Change-Id: I4e82f38627f2f0d50d8b05a8c02b5a35342f6526
2019-10-08 10:20:04 -07:00
Lucas Werkmeister
4adc557efa Clarify description of action=purge parameters
forcelinkupdate and forcerecursivelinkupdate are not limited to links
updates – content handlers can register arbitrary other secondary data
updates to perform.

(Both parameters also immediately update the parser cache for the
canonical parser options, but this does not seem worth mentioning.)

Change-Id: I5f3c8d1c22a08fee816121374620f207698c2715
2019-10-08 19:15:51 +02:00