Commit graph

91366 commits

Author SHA1 Message Date
jenkins-bot
d4e0dbcf96 Merge "ApiBase: Always validate that 'limit' is numeric" 2019-09-04 15:15:43 +00:00
jenkins-bot
bb575f1dc7 Merge "Include change tags in revision import structure" 2019-09-04 09:46:56 +00:00
Translation updater bot
39d5e7aa6e Localisation updates from https://translatewiki.net.
Change-Id: I1f3f259b07e4b7bd6ccd305af12fb8e9400a7407
2019-09-04 09:10:01 +02:00
jenkins-bot
25be8cc585 Merge "Remove unused variable in MultiHttpClient CURLOPT_READFUNCTION callback" 2019-09-04 03:00:09 +00:00
Daimona Eaytoy
43cc14657d Unsuppress phan issues, part 8
And also clean up the config.

Bug: T231636
Depends-On: Ie6233561de78457cae5e4e44e220feec2d1272d8
Change-Id: I82a279e1f7b0fdefd3bb712e46c7d0665429d065
2019-09-04 01:02:06 +00:00
jenkins-bot
e7051c851c Merge "Fix PhpStorm IDE warnings in ServiceWiring.php" 2019-09-04 00:03:39 +00:00
jenkins-bot
cdeb7109f2 Merge "Localisation updates from https://translatewiki.net." 2019-09-03 23:24:57 +00:00
Aaron Schulz
b7fce1c2f4 Fix PhpStorm IDE warnings in ServiceWiring.php
Change-Id: Ic1352311908a08a19346ebbee5f5ce73db7633f3
2019-09-03 23:03:23 +00:00
Bartosz Dziewoński
a9199bf854 ApiBase: Always validate that 'limit' is numeric
Bug: T231582
Change-Id: I956d4d623bfeace1b542039283e04a970fd40121
2019-09-04 00:27:12 +02:00
jenkins-bot
543c5c1a1f Merge "resourceloader: Compile documentElement.className server-side" 2019-09-03 21:04:23 +00:00
jenkins-bot
75e2607211 Merge "resourceloader: Reduce width of module hash from 7 chars to 5" 2019-09-03 19:21:39 +00:00
Adam Wight
b6afa0bd1b Include change tags in revision import structure
This makes it possible to import change tags, which will be leveraged by
Extension:FileImporter.

Bug: T227849
Change-Id: I70a8df2b2be0ec11806eb8d798115c52683cc787
2019-09-03 21:14:16 +02:00
jenkins-bot
13fb29a9af Merge "WebRequest: Optimise WebRequest::getPathInfo()" 2019-09-03 19:01:00 +00:00
jenkins-bot
31a987345d Merge "Better grouping for code adding elements to arrays" 2019-09-03 19:00:53 +00:00
jenkins-bot
3f67d38778 Merge "resourceloader: Add wgWikiID to mw.config in the startup module" 2019-09-03 18:39:32 +00:00
Timo Tijhof
fe889b7d6b WebRequest: Optimise WebRequest::getPathInfo()
Called for all PHP web requests from WebStart.php via
WebRequest::interpolateTitle.

* Use isset() instead of empty() where we only need to check
  that the key is supported.

* Don't import global `$wgUsePathInfo` in the common case.

* Migrate from deprecated wrapper Wikimedia\suppressWarnings
  to AtEase::suppressWarnings.

* Use strpos() instead of preg_match(). Consistently faster,
  albeit not by much (for 100 iterations: 0.04ms vs 0.23ms).

* Don't create unused $matches array for the common case.

Bug: T189966
Change-Id: I0de126953c25f3629cb85a0d4e46598baf261c15
2019-09-03 18:32:21 +00:00
jenkins-bot
cb5acb42ce Merge "Removing highlighting from mobile rcfilters" 2019-09-03 18:31:41 +00:00
Roan Kattouw
d45baf7f07 resourceloader: Add wgWikiID to mw.config in the startup module
This was previously just added by Echo, but it's generally useful.

We should probably deprecate wgDBname, because wgWikiID is a better wiki
identifier that also works when two wikis have different table prefixes
in the same database, but that'll take some work because a number of
things rely on it right now (including ResourceLoader itself, for its
localStorage keys).

Change-Id: I4d289267991f1f9a8e0710ec6ee5a2131306c510
2019-09-03 17:48:23 +00:00
jenkins-bot
8a4917968b Merge "Unsuppress another phan issue (part 7)" 2019-09-03 17:45:53 +00:00
jenkins-bot
925a865a01 Merge "preferences: Add typehint in saveFormData() for PreferencesFormOOUI" 2019-09-03 17:41:35 +00:00
Daimona Eaytoy
9881ea93be Better grouping for code adding elements to arrays
Change-Id: I7cc8c810f0dcf1ee84b9d5f14967ec2568e3e0be
Follow-up: I50377746f01749b058c39fd8229f9d566224cc43
2019-09-03 19:38:57 +02:00
Jan Drewniak
28d50d570a Removing highlighting from mobile rcfilters
Removes the highlighting feature from rcfilters (e.g. Special:RecentChanges)
when OO.ui.isMobile() is true (isMobile is true when MobileFrontend
is enabled).

Also prevents the "enhanced" list view module from being loaded in mobile mode, 
as the option to do so is disabled for mobile.

Bug: T231054
Change-Id: I1d4e1fdef6469f461ff4dad168ce01c856531d1c
2019-09-03 17:26:48 +00:00
Daimona Eaytoy
c659bc6308 Unsuppress another phan issue (part 7)
Bug: T231636
Depends-On: I2cd24e73726394e3200a570c45d5e86b6849bfa9
Depends-On: I4fa3e6aad872434ca397325ed7a83f94973661d0
Change-Id: Ie6233561de78457cae5e4e44e220feec2d1272d8
2019-09-03 17:19:21 +00:00
jenkins-bot
95d97f6f42 Merge "Revert "Modify -—with-extensions to throw extension dependency errors"" 2019-09-03 17:15:04 +00:00
Daimona Eaytoy
ed398c0253 preferences: Add typehint in saveFormData() for PreferencesFormOOUI
This was temporarily removed in 3bcf5655870f for compat with
the GlobalPreferences extension. The old typehint of HTMLForm
was incorrect (as discovered by a Phan rule that was disabled
for core), because getModifiedUser() only exists in the
PreferencesFormOOUI subclass.

Change-Id: I792286ed44f03467b5d875e61c52b1953252b55f
Depends-On: I4fa3e6aad872434ca397325ed7a83f94973661d0
2019-09-03 17:11:30 +00:00
jenkins-bot
0e8afecabc Merge "resourceloader: Move mw.user skeleton from startup to base" 2019-09-03 16:50:02 +00:00
Jforrester
cc7ec36a57 Revert "Modify -—with-extensions to throw extension dependency errors"
This reverts commit d9eec3c912.

Reason for revert: Breaking most of CI

Bug: T231876
Change-Id: I9b64a2bb770ee2e7ee717669070843814f37e81e
2019-09-03 16:35:48 +00:00
Marko Obrovac
f65beabcfd LocalRepo: Remove leading 0 from 32-byte SHA1 keys
Bug: T230667
Change-Id: I3d9de7a92495e894b4b44b0a5b0646b6d720f7c2
2019-09-03 16:04:14 +02:00
Clara Andrew-Wani
d9eec3c912 Modify -—with-extensions to throw extension dependency errors
Changes the behavior of -—with-extensions from silently skipping
extensions that lack another extension dependency to throwing an
install exception.

Bug: T225512
Change-Id: Ia5b41841aaf55fa5c4971ae67218f8231f8adcb8
2019-09-03 13:49:21 +02:00
jenkins-bot
a9fb2b3b06 Merge "FileJournal tests" 2019-09-03 11:22:00 +00:00
Aryeh Gregor
5bbcaef231 FileJournal tests
100% unit test coverage for FileJournal and NullFileJournal. 100%
integration test coverage for DBFileJournal. Unit tests for
DBFileJournal once it supports injection.

I removed FileJournal and NullFileJournal from the list of classes that
FileBackendTest tests. It doesn't actually test them, it just happens to
run code from them without checking its correctness at all.

Depends-On: Ic22075bb5e81b7c2c4c1b8647547aa55306a10a7
Change-Id: I46d10ab7b87c23937aa04d7ec1922abfcf3bd611
2019-09-03 10:12:41 +00:00
Translation updater bot
53b0a51e34 Localisation updates from https://translatewiki.net.
Change-Id: Ib8d7da32b31673e1c96b5ecb1f66eac8220217e4
2019-09-03 09:34:55 +02:00
Aaron Schulz
06032ec11e Remove unused variable in MultiHttpClient CURLOPT_READFUNCTION callback
Also make sure the result is a string as is required

Change-Id: I90107efd8f253aebc9b83fc2272aedf65ba161ba
2019-09-03 06:12:21 +00:00
jenkins-bot
7c9f1a1227 Merge "Add $specialPageAliases and $magicWords for Tajik" 2019-09-02 23:17:22 +00:00
jenkins-bot
bb30a0740e Merge "Correct the wording of the backend-fail-hash message" 2019-09-02 23:12:30 +00:00
jenkins-bot
4051970d03 Merge "Use IDatabase::buildStringCast in Special:MediaStatistics" 2019-09-02 23:12:21 +00:00
jenkins-bot
f0330a9198 Merge "Use Maintenance::getConfig in some maintenance scripts" 2019-09-02 23:12:15 +00:00
jenkins-bot
4b7cbbd998 Merge "Add Martin Urbanec to .mailmap" 2019-09-02 23:03:18 +00:00
jenkins-bot
0af2b4ffbd Merge "phpunit: Repair GLOBALS reset in MediaWikiUnitTestCase" 2019-09-02 20:52:18 +00:00
Timo Tijhof
29e0183a56 phpunit: Repair GLOBALS reset in MediaWikiUnitTestCase
This code didn't work because the $GLOBALS array is exposed by reference.
Once this reference was broken by unset(), the rest just manipulated a
local array that happens to be called "GLOBALS". It must not be unset or
re-assigned. It can only be changed in-place.

Before this, the execution of a MediaWikiUnitTestCase test stored a
copy of GLOBALS in unitGlobals, then lost the GLOBALS pointer and
created a new variable called "GLOBALS". As such, the tearDown() function
didn't do what it meant to do, either – which then results in odd
failures like T230023

Rewrite it as follows:

* In setup, store the current GLOBALS keys and values, then reduce
  GLOBALS to only the whitelisted keys and values.

* In teardown, restore the original state.

* As optimisation, do this from setUpBeforeClass as well, so that
  there are relatively few globals to reset between tests.
  (Thanks @Simetrical!)

The following tests were previously passing by accident under
MediaWikiUnitTestCase but actually did depend on global config.

* MainSlotRoleHandlerTest (…, ContentHandler, $wgContentHandlers)
* SlotRecordTest (…, ContentHandler, $wgContentHandlers)
* WikiReferenceTest (wfParseUrl, $wgUrlProtocols)
* DifferenceEngineSlotDiffRendererTest (DifferenceEngine, wfDebug, …)
* SlotDiffRendererTest (…, ContentHandler, $wgContentHandlers)
* FileBackendDBRepoWrapperTest (wfWikiID, "Backend domain ID not provided")
* JpegMetadataExtractorTest (…, wfDebug, …, LoggerFactory, …)
* ParserFactoryTest (…, wfDebug, …, LoggerFactory, InvalidArgumentException)
* MediaWikiPageNameNormalizerTest (…, wfDebug, …, LoggerFactory, …)
* SiteExporterTest (SiteImporter, wfLogWarning, …)
* SiteImporterTest (Site::newForType, $wgSiteTypes)
* ZipDirectoryReaderTest (…, wfDebug, …, LoggerFactory, …)

Bug: T230023
Change-Id: Ic22075bb5e81b7c2c4c1b8647547aa55306a10a7
2019-09-02 20:58:34 +01:00
jenkins-bot
072c406777 Merge "Fix duplicate Jon Harald Søby in CREDITS" 2019-09-02 19:37:19 +00:00
Amir Aharoni
8159307c70 Correct the wording of the backend-fail-hash message
Change-Id: I5dfc0fa4ecc04cd2e31a633b3a6473eca48ec6c4
2019-09-02 22:08:22 +03:00
jenkins-bot
35243c574f Merge "Permit case independent unit test directories" 2019-09-02 17:08:22 +00:00
jenkins-bot
3587a9427d Merge "objectcache: Optimise array_map in MemcachedBagOStuff::makeKey()" 2019-09-02 17:00:21 +00:00
jenkins-bot
95797de3d6 Merge "ProxyLookup: Optimise in_array in isConfiguredProxy()" 2019-09-02 17:00:13 +00:00
jenkins-bot
35ea4313e5 Merge "Rework ApiUploadTest" 2019-09-02 16:54:56 +00:00
jenkins-bot
72fa557f45 Merge "Correctly format null error reporting level" 2019-09-02 16:54:48 +00:00
jenkins-bot
00bef88407 Merge "Use the existing link renderer in the special page pagers" 2019-09-02 13:11:13 +00:00
Brad Jorsch
d458953f20 ApiQueryCategories: Supply limit for DB query
The limit is applied in PHP, but all matching rows are being fetched
from the database. We should only fetch the number of rows needed.

Bug: T231462
Change-Id: Ie64ea6f79a187942c476868c383a1349d110aa7c
2019-09-02 11:39:45 +00:00
jenkins-bot
97905cc790 Merge "Revert "Reset $wgContLang consistently for tests"" 2019-09-02 11:28:10 +00:00