Commit graph

92650 commits

Author SHA1 Message Date
jenkins-bot
bdebffae38 Merge "filebackend: rename $dir variables to $fsDirectory in FSFilebackend for clarity" 2019-10-24 16:51:55 +00:00
jenkins-bot
6c2201d553 Merge "filebackend: reduce unnecessary stat calls in FileBackend some cases" 2019-10-24 16:51:13 +00:00
jenkins-bot
5cf4b445bd Merge "Emit namespace for titles in ApiWatch" 2019-10-24 16:51:05 +00:00
DannyS712
93554568bb Emit namespace for titles in ApiWatch
Bug: T235477
Change-Id: Ib7a1e6c727f8c7d04b5b0b41ed385d451f25f611
2019-10-24 15:26:34 +00:00
jenkins-bot
c1ca93e612 Merge "Enable Book Referencing for development and tests" 2019-10-24 14:33:49 +00:00
Adam Wight
23a390e700 Enable Book Referencing for development and tests
Sets a feature flag to allow browser tests to use an experimental feature.

Bug: T236255
Change-Id: I1528c09bb2ae13c1a73f30432bdf3ec97d525860
2019-10-24 15:36:07 +02:00
jenkins-bot
1736ededc8 Merge "Try fixing flaky test" 2019-10-24 12:09:17 +00:00
Translation updater bot
cc2cb95ec6 Localisation updates from https://translatewiki.net.
Change-Id: I05306abf13bbf399259bf8c22bcb8f0fa6ad60c2
2019-10-24 08:44:39 +02:00
jenkins-bot
fb6fa7ed5e Merge "Collapse uses of now-deprecated wfGetRusage()" 2019-10-24 00:09:26 +00:00
jenkins-bot
b17550acf4 Merge "REST: add size and delta to revision metadata endpoint response." 2019-10-23 22:21:51 +00:00
Petr Pchelko
fa7520ed84 REST: add size and delta to revision metadata endpoint response.
Bug: T231588
Change-Id: Ib35a87d5d9c7c088c62423677163e4b243c92477
2019-10-23 14:12:22 -07:00
Max Semenik
d1604f7445 Mention requiring email address in password reset emails
Bug: T233969
Change-Id: Ife55911370bb672e25a6694d4cbbbfb7eeb9645b
2019-10-23 13:38:17 -07:00
Brad Jorsch
74f2902ed1 Try fixing flaky test
This test has been said to be flaky, and I suppose it could be if
it somehow regularly manages to tick a second in between the two calls
to wfTimestampNow(). So let's make just one call and reuse the value to
see if that fixes it.

Bug: T232266
Change-Id: I8fbdfa2f906839423cc238cd3741b94435a84505
2019-10-23 14:51:53 -04:00
jenkins-bot
e9d3a1203b Merge "Use $this->localisationCache instead of $this->getLocalisationCache()" 2019-10-23 17:55:52 +00:00
jenkins-bot
28d9b81c74 Merge "Fix line selection in RandomImageGenerator" 2019-10-23 15:43:05 +00:00
Brad Jorsch
f36e22dd8f Fix line selection in RandomImageGenerator
RandomImageGenerator::getRandomLines() is trying to select a random
subset of lines from a dictionary file, but the algorithm has a few bugs
that cause it to potentially leave entries in the returned array as null
and to be biased against the first few lines in the file.

This patch corrects the bugs to implement a Fisher–Yates (or Knuth)
shuffle,[1] run in reverse so that N does not need to be known ahead of
time and only maintaining the desired subset of the array in memory.

In local testing over many trials, it has produced output without nulls
100% of the time and the aggregate results do not have any obvious bias.

[1]: https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle

Bug: T222416
Change-Id: If136928bda2165198d3957a3536de85d465321fc
2019-10-23 10:52:50 -04:00
Thalia
a883b6b91b Add tests to ensure that block cookies are kept and removed correctly
Change-Id: I1ff885921b3f159ce41cb8cbd640b90ecd985d41
2019-10-23 14:47:37 +00:00
jenkins-bot
2190566f67 Merge "Deprecate public User properties related to blocks" 2019-10-23 13:45:19 +00:00
jenkins-bot
3627517ed8 Merge "libs/Message: Add DataMessageValue" 2019-10-23 13:35:31 +00:00
jenkins-bot
707f743955 Merge "build: Update linters and fix errors" 2019-10-23 13:35:25 +00:00
jenkins-bot
f22d2655d0 Merge "libs/Message: Add static constructor" 2019-10-23 12:07:24 +00:00
jenkins-bot
1fa6ba6c51 Merge "libs/Message: Improve parameter validation" 2019-10-23 12:06:42 +00:00
jenkins-bot
bca0dcc2da Merge "libs/Message: Improve tests" 2019-10-23 12:06:04 +00:00
Ed Sanders
3c2cea4559 build: Update linters and fix errors
Change-Id: Ieb1eff174f5168bf6c9e9aaeb58ec1a1bcd33538
2019-10-23 11:22:41 +01:00
Thalia
7f96f52187 Deprecate public User properties related to blocks
Deprecate mBlock, mBlockedby and mHideName as public properties,
since they allow the user to be put into an inconsistent state.
These properties were previously used by now-deprecated hooks
(bf5464614b, af24fc1a7a) and tests.

Bug: T229035
Change-Id: Ia657eaf8b5e4a77ff9df84eb706de1030e17c3bd
2019-10-23 10:49:35 +01:00
jenkins-bot
3d77ffddce Merge "Avoid use of private properties in RevDelFileItem::getApiData" 2019-10-23 09:39:00 +00:00
Translation updater bot
4d82c83502 Localisation updates from https://translatewiki.net.
Change-Id: Id963eeccf709ba9b0d58da5cc1643aade79ef031
2019-10-23 08:50:20 +02:00
Max Semenik
665b7758c5 tests: getMock() is deprecated
Bug: T192167
Change-Id: I94a4674103b0946d208ff0c28f260506048cb211
2019-10-22 14:20:25 -07:00
Fomafix
262946570a Use $this->localisationCache instead of $this->getLocalisationCache()
This change is a follow-up to 043d88f68.

Change-Id: I29e9232bfeeff8879e500f6a184078e7fafc6858
2019-10-22 21:16:16 +02:00
jenkins-bot
b5dfd7d7c1 Merge "Provide a more informative message for authentication block errors" 2019-10-22 17:53:18 +00:00
jenkins-bot
192181aa87 Merge "Throw a UserBlockedError from Special:Emailuser if a user is blocked" 2019-10-22 17:52:46 +00:00
Thalia
a652bb330a Pass the target as a string to the reason Message for autoblocks
Bug: T227007
Change-Id: Id56c7f41d96e378ff43d152ff7325de49be66df9
2019-10-22 16:51:10 +01:00
jenkins-bot
533346b24f Merge "Deprecate wfGetRusage(), no longer useful" 2019-10-22 14:13:14 +00:00
jenkins-bot
1c6263f49d Merge "Remove deprecated wikidiff2 configuration" 2019-10-22 12:04:58 +00:00
jenkins-bot
53eaa46b7c Merge "build: Upgrade mediawiki-phan-config to 0.8.0" 2019-10-22 10:37:47 +00:00
James D. Forrester
2bc660c95a Collapse uses of now-deprecated wfGetRusage()
Change-Id: I9a2b5d1234ebb458b6cd29797de3f387d1399e6f
2019-10-22 11:32:06 +01:00
James D. Forrester
13bd9a8845 Deprecate wfGetRusage(), no longer useful
Change-Id: Ibab4825b53cd76053f1e4ce8986dfac8054a04f8
2019-10-22 11:18:43 +01:00
jenkins-bot
9b362d92aa Merge "Fix new phan errors, part 9" 2019-10-22 09:51:21 +00:00
jenkins-bot
4340450030 Merge "Fix new phan errors, part 8" 2019-10-22 09:50:59 +00:00
Daimona Eaytoy
ae424ce5da build: Upgrade mediawiki-phan-config to 0.8.0
This is to ensure that the CI job is working with the new version.

Note: redundant_condition_detection should have worked as expected by
this version, but unfortunately it still has false positives.

Bug: T235049
Bug: T231636
Change-Id: Idaba6584cb5b2ff19b6455c7bbec6b89619ddbff
2019-10-22 09:16:45 +00:00
Translation updater bot
49688ea1f9 Localisation updates from https://translatewiki.net.
Change-Id: I09d6ed9e3402fa94d19be286df8ea60888d1ad89
2019-10-22 10:09:46 +02:00
Daimona Eaytoy
754d163e29 Fix new phan errors, part 9
This should be the last part before we can upgrade.

Bug: T231636
Change-Id: I076986ac2d2c9cbbdd1a4bf8c66e16cc014c8ffb
2019-10-22 08:09:36 +00:00
Daimona Eaytoy
b5f0d61ee4 Fix new phan errors, part 8
Bug: T231636
Change-Id: I61852ba55362ab9ae8cc8c1ab6b27565ce1d08e7
2019-10-22 10:09:13 +02:00
Translation updater bot
b2baea07dd Localisation updates from https://translatewiki.net.
Change-Id: I8cdfd0ff8c39dbe56cf68c824f621498b722ee97
2019-10-22 08:28:37 +02:00
jenkins-bot
35b29d132a Merge "objectcache: make incr() and incrWithInit() atomic in APCUBagOStuff" 2019-10-22 03:38:58 +00:00
Amir Aharoni
64e2d73f5c Split rest messages from the main en.json
Bug: T233192
Change-Id: I3990ae4e34a51e7648f74a05a4b7ac744fa9b9c4
2019-10-22 03:07:42 +00:00
Aaron Schulz
fff1e12362 filebackend: rename $dir variables to $fsDirectory in FSFilebackend for clarity
Change-Id: Ia8797899d39cc114fce9d52a02729c49397ef387
2019-10-22 02:29:36 +00:00
Aaron Schulz
752ad738e9 filebackend: reduce unnecessary stat calls in FileBackend some cases
* Only call FileBackend::clearCache() only specific file paths.
  Make FSFileBackend respect specific path lists in doClearCache().
* Detect FSFileBackendList errors during initialization rather than
  doing additional stat calls beforehand.
* Simplify FSFileBackend::doPrepareInternal() by removing is_readable()
  check as well as is_writable() when mkdir() was just successfully run.
* Simplify FSFileBackend::isPathUsableInternal() to just look at the
  parent directory (more likely to exist and be cacheable). Since files
  are renamed into place, there isn't much need to sanity check the
  target file path itself.
* Add a process cache for "usable directories" to FSFileBackend.
* Use is_dir() in TempFSFile to avoid triggering access() syscalls
  each time.

Change-Id: Ib2c76f4c4117b9beffd89370498aa57b5972f167
2019-10-22 02:29:26 +00:00
jenkins-bot
3e82e3968e Merge "installer: Remove "PHPBugTests" doc group" 2019-10-22 00:00:49 +00:00
jenkins-bot
23dfdf865f Merge "Fix new phan errors, part 7" 2019-10-21 23:00:40 +00:00