lhc/web/wiklou.git
4 years agoMerge "Fix SlotDiffRenderer documentation"
jenkins-bot [Mon, 29 Jul 2019 19:50:55 +0000 (19:50 +0000)]
Merge "Fix SlotDiffRenderer documentation"

4 years agoMerge "rdbms: make DatabaseSqlite::open() also check DBO_DEFAULT"
jenkins-bot [Mon, 29 Jul 2019 19:42:22 +0000 (19:42 +0000)]
Merge "rdbms: make DatabaseSqlite::open() also check DBO_DEFAULT"

4 years agoMerge "externalstore: use CONN_TRX_AUTOCOMMIT instead of IDatabase::clearFlag()"
jenkins-bot [Mon, 29 Jul 2019 19:34:55 +0000 (19:34 +0000)]
Merge "externalstore: use CONN_TRX_AUTOCOMMIT instead of IDatabase::clearFlag()"

4 years agoMerge "CopyTextLayout: Only select-all on focus"
jenkins-bot [Mon, 29 Jul 2019 19:11:55 +0000 (19:11 +0000)]
Merge "CopyTextLayout: Only select-all on focus"

4 years agoCopyTextLayout: Only select-all on focus
Ed Sanders [Mon, 29 Jul 2019 14:51:33 +0000 (15:51 +0100)]
CopyTextLayout: Only select-all on focus

This allows users to partially select the text, which is useful
in some cases, but still makes it easy to copy either using a keyboard
shortcut or the ButtonWidget.

Bug: T110579
Change-Id: I5be1530bb2cca9f8251e2e1c87a85e1e79cfe47f

4 years agoMerge "Remove TODO for unblockself"
jenkins-bot [Mon, 29 Jul 2019 13:11:57 +0000 (13:11 +0000)]
Merge "Remove TODO for unblockself"

4 years agoBetter handle "no accounts to unlink" case in Special:UnlinkAccounts
Brad Jorsch [Tue, 23 Jul 2019 16:02:11 +0000 (12:02 -0400)]
Better handle "no accounts to unlink" case in Special:UnlinkAccounts

When there are no accounts to unlink, say so rather than displaying a
button that results in an error when clicked.

Bug: T228717
Change-Id: I17f8aed213f114338c4b46e26ce369bc63e36a99

4 years agordbms: make DatabaseSqlite::open() also check DBO_DEFAULT
Aaron Schulz [Sun, 28 Jul 2019 16:38:29 +0000 (12:38 -0400)]
rdbms: make DatabaseSqlite::open() also check DBO_DEFAULT

Change-Id: Ib21078dc9d4aa8cba6c5cb6c25868af328c1cab6

4 years agoMerge "objectcache: make "busyValue" stricter to avoid callback ambigiuity"
jenkins-bot [Sat, 27 Jul 2019 14:51:08 +0000 (14:51 +0000)]
Merge "objectcache: make "busyValue" stricter to avoid callback ambigiuity"

4 years agoMerge "import: Fix wrong/unspecific type hints in UploadSourceAdapter"
jenkins-bot [Sat, 27 Jul 2019 14:23:46 +0000 (14:23 +0000)]
Merge "import: Fix wrong/unspecific type hints in UploadSourceAdapter"

4 years agoexternalstore: use CONN_TRX_AUTOCOMMIT instead of IDatabase::clearFlag()
Aaron Schulz [Sat, 27 Jul 2019 09:08:06 +0000 (05:08 -0400)]
externalstore: use CONN_TRX_AUTOCOMMIT instead of IDatabase::clearFlag()

Change-Id: I8984623d3ff67d305597f05c596c2777c2c117e0

4 years agoobjectcache: make "busyValue" stricter to avoid callback ambigiuity
Aaron Schulz [Fri, 19 Jul 2019 10:31:46 +0000 (03:31 -0700)]
objectcache: make "busyValue" stricter to avoid callback ambigiuity

Change-Id: I01a1503ff5b37d65ef148fef79270505d8eb3146

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 27 Jul 2019 06:18:05 +0000 (08:18 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I3289a8380de64e080ec1f19e3a443e27795f9d51

4 years agoRemove TODO for unblockself
David Barratt [Fri, 19 Jul 2019 18:12:06 +0000 (14:12 -0400)]
Remove TODO for unblockself

It is impossible to reach the unblockself code if someone is anonymous, so
there is no need to check that the block applies to that permission.

Bug: T228538
Change-Id: Ie7b1e0f37363cc9e75ee2c871c06cefdfb2eb1d1

4 years agoMerge "Follow-up f7cddcf7c1: Move RELEASE-NOTES-1.34 entry to right place"
jenkins-bot [Fri, 26 Jul 2019 23:03:53 +0000 (23:03 +0000)]
Merge "Follow-up f7cddcf7c1: Move RELEASE-NOTES-1.34 entry to right place"

4 years agoMerge "QueryPage: allow arbitrary sorting"
jenkins-bot [Fri, 26 Jul 2019 22:52:24 +0000 (22:52 +0000)]
Merge "QueryPage: allow arbitrary sorting"

4 years agoFollow-up f7cddcf7c1: Move RELEASE-NOTES-1.34 entry to right place
James D. Forrester [Fri, 26 Jul 2019 21:39:48 +0000 (14:39 -0700)]
Follow-up f7cddcf7c1: Move RELEASE-NOTES-1.34 entry to right place

This isn't a deprecation, it's a breaking config change, which we
put in either the "changed configuration" or the "breaking changes"
sections. In this case I'm dumping it into the former as that's
more frequently read by sysadmins.

Change-Id: I9d63be2ec6392b66c50fb96ada510584da9ec16a

4 years agoMerge "resourceloader: Move 'mw.config' assignment from startup.js to mediawiki.js"
jenkins-bot [Fri, 26 Jul 2019 20:27:45 +0000 (20:27 +0000)]
Merge "resourceloader: Move 'mw.config' assignment from startup.js to mediawiki.js"

4 years agoMerge "resourceloader: Remove internal 'wgResourceLoaderStorageEnabled' from mw.config"
jenkins-bot [Fri, 26 Jul 2019 20:24:18 +0000 (20:24 +0000)]
Merge "resourceloader: Remove internal 'wgResourceLoaderStorageEnabled' from mw.config"

4 years agoDeprecate wrapper SVGMetadataExtractor::getMetadata
Umherirrender [Sat, 30 Mar 2019 20:14:52 +0000 (21:14 +0100)]
Deprecate wrapper SVGMetadataExtractor::getMetadata

Use SVGReader->getMetadata() directly. Also rename the test,
because it covers the implementation and not the wrapper.

Change-Id: I61565c6aadc6d1c1e942b9bc4555ef4aeb09e5d8

4 years agoQueryPage: allow arbitrary sorting
Gergő Tisza [Fri, 26 Jul 2019 17:51:26 +0000 (19:51 +0200)]
QueryPage: allow arbitrary sorting

When the value field is not provided in QueryPage::getQueryInfo,
it is set to zero, essentially randomizing the result. Use a
sequential index instead.

Change-Id: I8b67268e3c59a51ed00bd832f80df184dd771c3b

4 years agoInject getLocalServerObjectCache() into the CachingSiteStore instance
Aaron Schulz [Sat, 20 Jul 2019 21:09:31 +0000 (14:09 -0700)]
Inject getLocalServerObjectCache() into the CachingSiteStore instance

This means SiteStore now uses APCu on PHP7 as well. Previously it only
used APC on HHVM, and used the main cache (e.g. Memcached) on PHP7.

Change-Id: I83ff1d2dd61c611c9976c6f9ca8026a0b6dd6662

4 years agoMerge "ApiSandbox: Fix upload widget"
jenkins-bot [Fri, 26 Jul 2019 16:09:39 +0000 (16:09 +0000)]
Merge "ApiSandbox: Fix upload widget"

4 years agoMerge "Don't try to store File objects to the upload session"
jenkins-bot [Fri, 26 Jul 2019 15:27:09 +0000 (15:27 +0000)]
Merge "Don't try to store File objects to the upload session"

4 years agoMerge "rdbms: remove various deprecated methods"
jenkins-bot [Fri, 26 Jul 2019 15:16:38 +0000 (15:16 +0000)]
Merge "rdbms: remove various deprecated methods"

4 years agoMerge "Fix exception when viewing special pages with relative related titles"
jenkins-bot [Fri, 26 Jul 2019 15:11:15 +0000 (15:11 +0000)]
Merge "Fix exception when viewing special pages with relative related titles"

4 years agoApiSandbox: Fix upload widget
Brad Jorsch [Fri, 26 Jul 2019 15:03:24 +0000 (11:03 -0400)]
ApiSandbox: Fix upload widget

Attempting to send the request with an active upload widget was
producing a JavaScript error "TypeError: this.setIcon is not a
function". This was probably broken by Iaaa226ea.

Further, validation was not working correctly since getValue() was
returning undefined rather than null as documented. This was probably
broken by I8d736fbb.

Bug: T229123
Change-Id: I78a6f9f0cffcd229ec0ab80c2309a0ee2089c927

4 years agordbms: remove various deprecated methods
Aaron Schulz [Thu, 27 Jun 2019 08:13:13 +0000 (01:13 -0700)]
rdbms: remove various deprecated methods

Change-Id: I5ae923065a08078225b7df080cb92edca799ebaf

4 years agoMerge "Code cleanup related to initSpeculativePageId()"
jenkins-bot [Fri, 26 Jul 2019 14:55:33 +0000 (14:55 +0000)]
Merge "Code cleanup related to initSpeculativePageId()"

4 years agoMerge "rdbms: make LoadBalancer::waitForAll() include servers with load in any group"
jenkins-bot [Fri, 26 Jul 2019 14:53:30 +0000 (14:53 +0000)]
Merge "rdbms: make LoadBalancer::waitForAll() include servers with load in any group"

4 years agordbms: normalize Database open() code and error handling
Aaron Schulz [Thu, 11 Jul 2019 02:35:46 +0000 (19:35 -0700)]
rdbms: normalize Database open() code and error handling

Mainly:
* Use oci_new_connect() for Oracle to avoid broken connection reuse
  similar to the PGSQL_CONNECT_FORCE_NEW flag in DatabasePostgres
* Set 'client_min_messages' unconditionally for PostgreSQL
* Factor out Database::getConnectExceptionAndLog() helper method
* Use the same style of query() calls in DatabaseOracle::open() as
  the other subclasses
* Make sure the Database driver handle field is null on failure
  instead of false for sanity

Also:
* Disallow changing of Database handle DBO_* flags after construction
  where it does not make sense to change them
* Do not mention DBO_* flags meant for non-config use in $wgDBservers
* Ignore DBO_PERSISTENT for SQLite if DBO_TRX is also set for sanity
* Remove $wgDBOracleDRCP variable to discourage careless automatic
  setting of DBO_PERSISTENT that breaks LoadBalancer assumptions

Change-Id: Iea948f7f872294ea8fc5d897fc10c9d29b7141d5

4 years agoMerge "Convert LoadBalancer::getConnection() callers to LoadBalancer::getConnectionRef()"
jenkins-bot [Fri, 26 Jul 2019 14:02:29 +0000 (14:02 +0000)]
Merge "Convert LoadBalancer::getConnection() callers to LoadBalancer::getConnectionRef()"

4 years agoCode cleanup related to initSpeculativePageId()
Tim Starling [Fri, 26 Jul 2019 06:39:16 +0000 (16:39 +1000)]
Code cleanup related to initSpeculativePageId()

Change-Id: I5b97c6292a28df6633c573a05c89210b096db5a8

4 years agoparser: add speculative page IDs to use with {{PAGEID}}
Aaron Schulz [Thu, 27 Jun 2019 04:30:35 +0000 (21:30 -0700)]
parser: add speculative page IDs to use with {{PAGEID}}

This works similarly to speculative rev IDs with {{REVISIONID}}.
Re-parses can be avoided if the page ID is correctly guessed.

Also make the {{PAGEID:X}} parser function set vary-page-id.

Bug: T226785
Change-Id: I0b19be45e6ddd6cde330bfcd09d243e4e5beda01

4 years agoMerge "MediumSpecificBagOStuff: Make convertToRelative(0) return 0, not 1"
jenkins-bot [Fri, 26 Jul 2019 06:34:14 +0000 (06:34 +0000)]
Merge "MediumSpecificBagOStuff: Make convertToRelative(0) return 0, not 1"

4 years agoDon't try to store File objects to the upload session
Tim Starling [Fri, 26 Jul 2019 05:07:41 +0000 (15:07 +1000)]
Don't try to store File objects to the upload session

File objects can contain closures which can't be serialized.

Instead, add makeWarningsSerializable(), which converts the warnings
to a serializable array. Make ApiUpload::transformWarnings() act on this
serializable array instead. For consistency, ApiUpload::getApiWarnings()
also needs to convert the result of checkWarnings() before transforming
it.

Bug: T228749
Change-Id: I8236aaf3683f93a03a5505803f4638e022cf6d85

4 years agoMerge "API: Only take HTTP code from ApiUsageException"
jenkins-bot [Fri, 26 Jul 2019 01:50:56 +0000 (01:50 +0000)]
Merge "API: Only take HTTP code from ApiUsageException"

4 years agoFix exception when viewing special pages with relative related titles
Max Semenik [Fri, 26 Jul 2019 01:44:28 +0000 (18:44 -0700)]
Fix exception when viewing special pages with relative related titles

Bug: T227817
Change-Id: I17e4acae81792c6d13c706741ec2a953300ac004

4 years agoMediumSpecificBagOStuff: Make convertToRelative(0) return 0, not 1
Roan Kattouw [Thu, 25 Jul 2019 23:39:33 +0000 (16:39 -0700)]
MediumSpecificBagOStuff: Make convertToRelative(0) return 0, not 1

This matches the (explicitly documented) behavior of convertToExpiry(),
and unbreaks storing things in Redis with an indefinite TTL. Without
this change, any attempt to store something in Redis indefinitely
resulted in it being stored with a TTL of 1 second instead.

Follow-up to I1bebb60307.

Bug: T228744
Change-Id: Ia3f71fb787196b956e974beb9f20d72e58ef3eb4

4 years agoMerge "resourceloader: Improve ResourceLoaderWikiModule test coverage"
jenkins-bot [Thu, 25 Jul 2019 23:53:40 +0000 (23:53 +0000)]
Merge "resourceloader: Improve ResourceLoaderWikiModule test coverage"

4 years agoMerge "objectcache: let BagOStuff::getWithSetCallback() callbacks modify the TTL"
jenkins-bot [Thu, 25 Jul 2019 23:26:05 +0000 (23:26 +0000)]
Merge "objectcache: let BagOStuff::getWithSetCallback() callbacks modify the TTL"

4 years agoMerge "resourceloader: Remove incomprehensible `@todo` in getTestModuleNames()"
jenkins-bot [Thu, 25 Jul 2019 23:06:31 +0000 (23:06 +0000)]
Merge "resourceloader: Remove incomprehensible `@todo` in getTestModuleNames()"

4 years agoMerge "phpunit: Avoid get_class() in MediaWikiCoversValidator"
jenkins-bot [Thu, 25 Jul 2019 23:03:55 +0000 (23:03 +0000)]
Merge "phpunit: Avoid get_class() in MediaWikiCoversValidator"

4 years agoresourceloader: Remove incomprehensible `@todo` in getTestModuleNames()
Timo Tijhof [Thu, 25 Jul 2019 22:46:11 +0000 (23:46 +0100)]
resourceloader: Remove incomprehensible `@todo` in getTestModuleNames()

I added this 7.5 years ago with r111378 (5bf04171dc3), but I can't
recall what this would have been for. Perhaps we wanted to expose
the list of modules (or test frameworks) via ApiQuerySiteInfo, but
I don't know why, or what purpose it would serve.

Change-Id: I4005979252533a752178e6f1ac9900f32132c27e

4 years agophpunit: Avoid get_class() in MediaWikiCoversValidator
Timo Tijhof [Thu, 25 Jul 2019 22:38:50 +0000 (23:38 +0100)]
phpunit: Avoid get_class() in MediaWikiCoversValidator

I notice that in CI, the inherited "testValidCovers" often shows
multiple times for test classes as being slow (50ms+).

E.g. from a quibble/php72 job:

> …
> 85ms to run ResourceLoaderWikiModuleTest:testValidCovers
> …

Bug: T225730
Change-Id: I524df134c52173c49ebb2b263a90bb5732255865

4 years agoresourceloader: Improve ResourceLoaderWikiModule test coverage
Timo Tijhof [Thu, 25 Jul 2019 22:23:24 +0000 (23:23 +0100)]
resourceloader: Improve ResourceLoaderWikiModule test coverage

* Remove redundant getContent() cases that were all testing the same.
  The redirect logic should indeed be tested, but exists in getContentObj(),
  not getContent(). This test was also mocking getContentObj() thus not
  actually testing what the case claims to test.
  Fortunately, the right test already exists (testGetContentForRedirects),
  so this is redundant.

* Add actual coverage of successful outcomes for getContent (previously
  they were all error/null cases), with JS content, and with CSS content.

* Fix broken test case for "Bad content model". This was not working because
  it mocked out getContentObj, thus it wasn't actually testing "bad content model",
  but rather pointlessly duplicated the previous test case.
  Fix it by actually making it use a WikitextContent object, which makes it
  test the branch that handles incompatible content models.

Change-Id: I59af5318e536c730755352e9be8f995df1f56a86

4 years agoMerge "Enable RecentChanges modules on mobile"
jenkins-bot [Thu, 25 Jul 2019 22:29:33 +0000 (22:29 +0000)]
Merge "Enable RecentChanges modules on mobile"

4 years agoEnable RecentChanges modules on mobile
jdlrobson [Thu, 25 Jul 2019 21:41:58 +0000 (14:41 -0700)]
Enable RecentChanges modules on mobile

Change-Id: I9ec4b70390700cd697faeffd8f70c67e9c542e82

4 years agoMerge "Improve type hints in export related classes"
jenkins-bot [Thu, 25 Jul 2019 21:42:32 +0000 (21:42 +0000)]
Merge "Improve type hints in export related classes"

4 years agoMerge "Add permission check for user is permitted to view the log type"
jenkins-bot [Thu, 25 Jul 2019 21:26:41 +0000 (21:26 +0000)]
Merge "Add permission check for user is permitted to view the log type"

4 years agoMerge "Type hint against LinkTarget in WatchedItemStore"
jenkins-bot [Thu, 25 Jul 2019 21:23:58 +0000 (21:23 +0000)]
Merge "Type hint against LinkTarget in WatchedItemStore"

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 25 Jul 2019 20:39:50 +0000 (22:39 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I32ed9eb31204d18421f9d986d049feca65fbb62e

4 years agoAdd permission check for user is permitted to view the log type
rxy [Fri, 31 May 2019 20:04:09 +0000 (20:04 +0000)]
Add permission check for user is permitted to view the log type

Note: formatter patch only

Note: cherry-picked I064f563cb here as well

Bug: T222038
Change-Id: I1c4e57a513e3a0e616b862a5b9d684f463ad9981

4 years agoMerge "resourceloader: Also clear store in debug mode to simplify mw.loader.store...
jenkins-bot [Thu, 25 Jul 2019 20:20:34 +0000 (20:20 +0000)]
Merge "resourceloader: Also clear store in debug mode to simplify mw.loader.store.init()"

4 years agoresourceloader: Move 'mw.config' assignment from startup.js to mediawiki.js
Timo Tijhof [Thu, 25 Jul 2019 16:46:01 +0000 (17:46 +0100)]
resourceloader: Move 'mw.config' assignment from startup.js to mediawiki.js

Before this change, the startup module responds as follows:

   ```lang=js
   ... contents of startup/mediawiki.js:
   ...... mw.config = null;
   ...
   ... contents of startup/startup.js:
   ...... mw.config = new mw.Map( bool );
   ```

After this change:

   ```lang=js
   ... contents of startup/mediawiki.js:
   ...... mw.config = new mw.Map( bool );
   ...
   ... contents of startup/startup.js:
   ......
   ```

Change-Id: I97fea20f17c4865aa4740482f3054532038531f0

4 years agoMerge "Update documentation for $wgAutopromote"
jenkins-bot [Thu, 25 Jul 2019 16:45:52 +0000 (16:45 +0000)]
Merge "Update documentation for $wgAutopromote"

4 years agoresourceloader: Remove internal 'wgResourceLoaderStorageEnabled' from mw.config
Timo Tijhof [Thu, 25 Jul 2019 16:41:06 +0000 (17:41 +0100)]
resourceloader: Remove internal 'wgResourceLoaderStorageEnabled' from mw.config

Only needed internally by the startup module, which can export it
through private means instead.

Follows 0a8e37f042c2c and 30ddfc8a7721.

Change-Id: I5e54bd51d9b47146e1ef9a64b14c1a00697bd6a9

4 years agoresourceloader: Also clear store in debug mode to simplify mw.loader.store.init()
Timo Tijhof [Thu, 25 Jul 2019 16:37:46 +0000 (17:37 +0100)]
resourceloader: Also clear store in debug mode to simplify mw.loader.store.init()

This makes it consistent with the other two circumstances in which
mw.loader.store is disabled.

Also, it makes debug=true a more easily accessible means for users
to clear module storage, which can be useful at times (without requiring
console access).

Change-Id: I9c66815a2f6c60feef3e070cfe57c382a69cc752

4 years agoMake wfGetDB() return a MaintainableDBConnRef instance (take 2)
Krinkle [Wed, 24 Jul 2019 19:29:56 +0000 (19:29 +0000)]
Make wfGetDB() return a MaintainableDBConnRef instance (take 2)

This enforces the DB_* role checks of DBConnRef in more places.

This is a re-submission of 335066505a3ea, which was reverted due to T228928.

Change-Id: I556627dc6486e6f6539d1d2dd5aa6f009eff341e

4 years agoMerge "Replace wfGetDB in ParserTestRunner"
jenkins-bot [Thu, 25 Jul 2019 13:47:15 +0000 (13:47 +0000)]
Merge "Replace wfGetDB in ParserTestRunner"

4 years agoMerge "MimeAnalyzer: fix ZIP parsing failure"
jenkins-bot [Thu, 25 Jul 2019 13:36:09 +0000 (13:36 +0000)]
Merge "MimeAnalyzer: fix ZIP parsing failure"

4 years agoMerge "parser: inject a Logger into Parser instead of using wfDebug()"
jenkins-bot [Thu, 25 Jul 2019 10:41:07 +0000 (10:41 +0000)]
Merge "parser: inject a Logger into Parser instead of using wfDebug()"

4 years agoMimeAnalyzer: fix ZIP parsing failure
Tim Starling [Thu, 25 Jul 2019 03:29:44 +0000 (13:29 +1000)]
MimeAnalyzer: fix ZIP parsing failure

unpack() actually returns an array with indexes starting from 1, not
zero, so unpack(...)[0] gives a notice and always returns null. It is
lucky that ZIPs normally have zero-length comments, so this would have
had little impact on file type detection aside from log spam.

Also, add a check to make sure the unpack() will not read beyond
the end of the file. Without this, unpack() could generate a warning.

The bug was introduced by me in f12db3804882272794b.

Add tests. The test files were generated by appending an EOCDR signature
and some extra bytes to 1bit-png.png.

Bug: T223728
Change-Id: I6fab63102d1d8eea92cdcce5ab6d1eb747a0a890

4 years agoMerge "Do not block autopromote on partial blocks"
jenkins-bot [Wed, 24 Jul 2019 22:41:53 +0000 (22:41 +0000)]
Merge "Do not block autopromote on partial blocks"

4 years agoUpdate documentation for $wgAutopromote
Thalia [Wed, 24 Jul 2019 22:21:06 +0000 (23:21 +0100)]
Update documentation for $wgAutopromote

Follow-up to 1ad840da68

Change-Id: I7c2dedf3824154c0c844f73a98e6824fe8ff141a

4 years agoMerge "Remove deprecated handling of array keys for $wgProxyList"
jenkins-bot [Wed, 24 Jul 2019 22:01:08 +0000 (22:01 +0000)]
Merge "Remove deprecated handling of array keys for $wgProxyList"

4 years agoReplace wfGetDB in ParserTestRunner
Gergő Tisza [Wed, 24 Jul 2019 21:52:24 +0000 (23:52 +0200)]
Replace wfGetDB in ParserTestRunner

After I0d7dacee3, wfGetDB returns a connection reference instead of
a real connection, which means it can't be passed to CloneDatabase
anymore, and testcase / test runner classes should avoid it.

Bug: T228928
Change-Id: I42be4214e33a4d4f8d53fafc925c8d708b4c0106

4 years agoRemove deprecated handling of array keys for $wgProxyList
Thalia [Wed, 24 Jul 2019 17:17:36 +0000 (18:17 +0100)]
Remove deprecated handling of array keys for $wgProxyList

Change-Id: Ic9cc2a5585180ab57fd361342cbac8210b094a5c

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 24 Jul 2019 20:02:28 +0000 (22:02 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I70c061d14d3768c28234257004f35299c80a3201

4 years agoMerge "Revert "Make wfGetDB() return a MaintainableDBConnRef instance""
jenkins-bot [Wed, 24 Jul 2019 18:22:03 +0000 (18:22 +0000)]
Merge "Revert "Make wfGetDB() return a MaintainableDBConnRef instance""

4 years agoRevert "Make wfGetDB() return a MaintainableDBConnRef instance"
Krinkle [Wed, 24 Jul 2019 18:07:18 +0000 (18:07 +0000)]
Revert "Make wfGetDB() return a MaintainableDBConnRef instance"

This reverts commit 335066505a3ea6121f3c5b5eae43b0c37ca6e2eb.

The standalone parser test runner, as used by Parsoid Jenkins builds,
is (indirectly) using wfGetDB in a way that isn't supported (changing
the selected database). This needs to be fixed, but we can give it
a few days.

Change-Id: I07ff422dd56d5700e570100747aa49b7764ec80f

4 years agoMerge "Add null to Parser::getTitle return doc"
jenkins-bot [Wed, 24 Jul 2019 18:02:51 +0000 (18:02 +0000)]
Merge "Add null to Parser::getTitle return doc"

4 years agoMake wfGetDB() return a MaintainableDBConnRef instance
Aaron Schulz [Sun, 7 Apr 2019 00:28:14 +0000 (17:28 -0700)]
Make wfGetDB() return a MaintainableDBConnRef instance

This enforces the DB_* role checks of DBConnRef in more places

Depends-on: I9328e709fe5d81099338a31deef24d34db22d784
Change-Id: I0d7dacee3ec4ef67dc0b0f6551ad046c74dc47dc

4 years agoMerge "installer: Stop offering MyISAM option for new installs and fix bogus method...
jenkins-bot [Wed, 24 Jul 2019 15:51:56 +0000 (15:51 +0000)]
Merge "installer: Stop offering MyISAM option for new installs and fix bogus method calls"

4 years ago.travis.yml: Don't allow failures for PHP 7.3 any more
James D. Forrester [Wed, 24 Jul 2019 14:39:01 +0000 (07:39 -0700)]
.travis.yml: Don't allow failures for PHP 7.3 any more

Bug: T204884
Change-Id: I797855405cced7471ab40a7cf80980cf68c840ce

4 years agoMerge "Users with partial access to user rights should not be blocked"
jenkins-bot [Wed, 24 Jul 2019 12:44:47 +0000 (12:44 +0000)]
Merge "Users with partial access to user rights should not be blocked"

4 years agoMerge "make XmlDumpwriter more resilient to blob store corruption"
jenkins-bot [Wed, 24 Jul 2019 12:13:53 +0000 (12:13 +0000)]
Merge "make XmlDumpwriter more resilient to blob store corruption"

4 years agoMerge "Drop newlines in LocalisationCache debug logs"
jenkins-bot [Wed, 24 Jul 2019 10:47:00 +0000 (10:47 +0000)]
Merge "Drop newlines in LocalisationCache debug logs"

4 years agoDrop newlines in LocalisationCache debug logs
Antoine Musso [Wed, 24 Jul 2019 10:14:33 +0000 (12:14 +0200)]
Drop newlines in LocalisationCache debug logs

316d205115c migrated LocalisationCache from wfDebugLog() to the Logger
interface which no more requires the messages to be terminated with a
new line.

Change-Id: Ibe2f750e7ab16cf91801988cb726adb67f7cd9d2

4 years agoMerge "Validate sort order in Special:Search"
jenkins-bot [Wed, 24 Jul 2019 10:10:23 +0000 (10:10 +0000)]
Merge "Validate sort order in Special:Search"

4 years agomake XmlDumpwriter more resilient to blob store corruption
Ariel T. Glenn [Wed, 24 Jul 2019 05:56:41 +0000 (08:56 +0300)]
make XmlDumpwriter more resilient to blob store corruption

Loading content can also throw InvalidArgumentException when
the cluster address is an unknown cluster.

Bug: T228720
Change-Id: I313f9a5a27b21a33e90639abae3f505640c30e23

4 years agoAdd null to Parser::getTitle return doc
Sam Wilson [Wed, 24 Jul 2019 05:00:13 +0000 (13:00 +0800)]
Add null to Parser::getTitle return doc

Change-Id: I5086f636114cec83f0188d2309ea70aef27df13d

4 years agoFix and re-apply "RedirectSpecialPage: handle interwiki redirects"
Gergő Tisza [Tue, 16 Jul 2019 13:28:28 +0000 (13:28 +0000)]
Fix and re-apply "RedirectSpecialPage: handle interwiki redirects"

This re-applies commit 41106688abbe6dfff61c5642924ced42af3f0d33
(thereby reverting commit 6c57748aeee6e4f2a197d64785102306fbd4a297)
and fixes it for local interwiki redirects by adding and using a
forcing parameter in Special:GoToInterwiki to treat local redirects
like external ones.

Bug: T227700
Change-Id: I4bc2ed998430fc2bac71baf850b8988fdb24c1ac

4 years agoMerge "Drop mediawiki.dic, useless and poorly updated"
jenkins-bot [Wed, 24 Jul 2019 02:21:04 +0000 (02:21 +0000)]
Merge "Drop mediawiki.dic, useless and poorly updated"

4 years agoMerge "Don't double wrap rollback links"
jenkins-bot [Tue, 23 Jul 2019 21:13:46 +0000 (21:13 +0000)]
Merge "Don't double wrap rollback links"

4 years agoMerge "Add Hebrew aliases for some special pages"
jenkins-bot [Tue, 23 Jul 2019 20:34:00 +0000 (20:34 +0000)]
Merge "Add Hebrew aliases for some special pages"

4 years agoMerge "Drop wgPasswordSalt, deprecated since 1.24"
jenkins-bot [Tue, 23 Jul 2019 19:13:11 +0000 (19:13 +0000)]
Merge "Drop wgPasswordSalt, deprecated since 1.24"

4 years agoDon't double wrap rollback links
jdlrobson [Tue, 23 Jul 2019 19:07:47 +0000 (12:07 -0700)]
Don't double wrap rollback links

Bug: T228766
Change-Id: Iaca54e1ceefc73815fe3d9898ca490b74d11dac6

4 years agoMerge "objectcache: Use variadic signature for makeKey()"
jenkins-bot [Tue, 23 Jul 2019 19:00:17 +0000 (19:00 +0000)]
Merge "objectcache: Use variadic signature for makeKey()"

4 years agoobjectcache: Use variadic signature for makeKey()
Timo Tijhof [Sat, 20 Jul 2019 16:49:06 +0000 (17:49 +0100)]
objectcache: Use variadic signature for makeKey()

This should help fix the following issues that various repos
are getting from Phan as of late:

> Call with 5 arg(s) to \BagOStuff::makeKey() which only takes 2 arg(s)
> defined at ../../includes/libs/objectcache/BagOStuff.php:456
> <source="PhanParamTooMany"/>

Bug: T228563
Depends-On: I5cfba063821101325a5a7359e6b8ad71a0fb1b2f
Depends-On: Ifa5b96735376f2fbe3680799f960616ba8d357ff
Change-Id: Ic9df7f3ad7f356c7cbdfe1edfbe35821b931dda6

4 years agoValidate sort order in Special:Search
Erik Bernhardson [Mon, 22 Jul 2019 19:10:54 +0000 (12:10 -0700)]
Validate sort order in Special:Search

Providing an invalid sort order to Special:Search could trigger an
exception from the search engine when trying to apply it. Validate the
sort order, much like API classes do, and let the user know that the
sort they requested could not be applied.

We also have a unreported error for invalid profile requested, so
added that warning to the display while here.

Bug: T228171
Change-Id: I79079eea8c03a90b5b65f1dad11c99e514de00e1

4 years agoMerge "Make XmlDumpwriter resilient to blob store corruption."
jenkins-bot [Tue, 23 Jul 2019 17:13:45 +0000 (17:13 +0000)]
Merge "Make XmlDumpwriter resilient to blob store corruption."

4 years agoMerge "Avoid the use of silence operator (@) and use AtEase methods"
jenkins-bot [Tue, 23 Jul 2019 16:23:02 +0000 (16:23 +0000)]
Merge "Avoid the use of silence operator (@) and use AtEase methods"

4 years agoMerge "filerepo: make ForeignApiRepo::httpGetCached() use "pcGroup""
jenkins-bot [Tue, 23 Jul 2019 15:50:13 +0000 (15:50 +0000)]
Merge "filerepo: make ForeignApiRepo::httpGetCached() use "pcGroup""

4 years agoMerge "filebackend: avoid use of LoadBalancer::newMainLB() in LockManagerGroup"
jenkins-bot [Tue, 23 Jul 2019 15:15:48 +0000 (15:15 +0000)]
Merge "filebackend: avoid use of LoadBalancer::newMainLB() in LockManagerGroup"

4 years agoMerge "Replace wfWiki() usage with WikiMap in some additional places"
jenkins-bot [Tue, 23 Jul 2019 15:02:47 +0000 (15:02 +0000)]
Merge "Replace wfWiki() usage with WikiMap in some additional places"

4 years agoobjectcache: let BagOStuff::getWithSetCallback() callbacks modify the TTL
Aaron Schulz [Tue, 23 Jul 2019 14:33:40 +0000 (07:33 -0700)]
objectcache: let BagOStuff::getWithSetCallback() callbacks modify the TTL

Also simplify the code by removing the is_callable() check and relying on
regular PHP errors instead of an exception for bad callbacks.

Change-Id: I084b0132c5fb05f1941a6d6839cfa74e2cf677f0

4 years agoAPI: Only take HTTP code from ApiUsageException
Brad Jorsch [Tue, 23 Jul 2019 14:23:07 +0000 (10:23 -0400)]
API: Only take HTTP code from ApiUsageException

Codes set on other Exception types are unlikely to be intended as HTTP
codes.

Bug: T228758
Change-Id: Ia6a53cb621f87ff97d5f16215a1b09ae11ca8f53

4 years agoAdd release note for custom OOUI themes using OOUIThemePaths (T100896)
Bartosz Dziewoński [Tue, 23 Jul 2019 12:57:38 +0000 (14:57 +0200)]
Add release note for custom OOUI themes using OOUIThemePaths (T100896)

Change-Id: I98f370310d93fc178e0baf55798808fa4ece2f92

4 years agoMake XmlDumpwriter resilient to blob store corruption.
daniel [Tue, 23 Jul 2019 11:23:41 +0000 (13:23 +0200)]
Make XmlDumpwriter resilient to blob store corruption.

In the WMF databases, we have several revisions for which we cannot
load the content. They typically (but not necessarily) have
content_address = "tt:0" and content_sha1 = "" and rev_sha1 = ""
and content_size = 0 and rev_len = 0.

This patch makes sure we can still generate dumps in the presence of
such revisions.

Bug: T228720
Change-Id: Iaadad44eb5b5fe5a4f2e60da406ffc11f39c735b