edderso [Tue, 30 Jul 2019 17:46:47 +0000 (18:46 +0100)]
Fix recent changes and watchlist separator whitespace
Added spaces around 'mw-changeslist-separator' spans in EnhancedChangesListGroup.mustache
Bug: T222903
Change-Id: Ie7e09a39a8f51943fa6c2c244d80435150296a5c
Timo Tijhof [Tue, 30 Jul 2019 00:05:42 +0000 (01:05 +0100)]
resourceloader: Only register 'jquery.qunit' in test context
Change-Id: I0ea4bb73d5b886ea903a19a12bdd464778af0002
Timo Tijhof [Tue, 30 Jul 2019 15:06:35 +0000 (16:06 +0100)]
resourceloader: Don't explicitly enqueue test libs on SpecialJavaScriptTest
The test-only modules registered by QUnitTestResources.php are currently
were previously caught by the array_keys() catch-all in registerTestModules()
which meant that modules like 'test.sinonjs' would be requested on
SpecialJavaScriptTest despite not doing anything by itself, nor executing
at the "right" time per se through this means.
In order for it to execute at the right time, the testrunner has to depend
on it (which it does, already). But, that also means it doesn't need to
be requested separately. Doing so could be confusing.
This is neccecary in order to move 'jquery.qunit' from Resources.php
to QUnitTestResources.php as otherwise, listing in QUnitTestResources.php,
would implicitly mean SpecialJavaScriptTest.php thinks it's a test suite
and load it. That is a problem, because when we run the tests headless from
the command-line with Karma, the environment already has a QUnit interface
defined, and should not be loaded a second time by MW.
Change-Id: I08b31cd1dee516cf0d26bafdb8cc7c1223633bad
Aaron Schulz [Tue, 30 Jul 2019 15:37:34 +0000 (11:37 -0400)]
filebackend: avoid use of IDatabase::clearFlags() in DBLockManager
Change-Id: I143533790363d8bb9b9038cf320b251131602d4a
jenkins-bot [Tue, 30 Jul 2019 15:23:06 +0000 (15:23 +0000)]
Merge "Adapt Recent Changes advanced filters for mobile usage"
Timo Tijhof [Tue, 30 Jul 2019 14:28:21 +0000 (15:28 +0100)]
resourceloader: Remove deprecated ResourceLoaderContext::expandModuleNames
Change-Id: If9aa389cc64cb41e60c865d586d644d9f3bca9b5
jenkins-bot [Tue, 30 Jul 2019 14:15:57 +0000 (14:15 +0000)]
Merge "Fix punctuation in HTMLForm documentation"
Thalia [Tue, 30 Jul 2019 13:43:39 +0000 (14:43 +0100)]
Fix punctuation in HTMLForm documentation
Change-Id: I22c4ed248fddc93afd486b9bee5a80bdbba1c685
Derick Alangi [Sat, 27 Jul 2019 18:29:24 +0000 (19:29 +0100)]
pager: Add visibility methods declared in the Pager interface
In addition, also add visibility to the class(es) that implement
the method.
Change-Id: If650cfcafbe4fe8cd4d2e0629df3f170c599ea41
Jan Drewniak [Fri, 14 Jun 2019 10:04:01 +0000 (12:04 +0200)]
Adapt Recent Changes advanced filters for mobile usage
Changes the behaviour of the rcfilter search input by essentially
turning it into a button for mobile devices. Depending on the value
of `OO.ui.isMobile()` the input is set to readonly mode and given
a shorter message and different icon.
Setting the search input to readonly prevents onscreen keyboards from
being actived, but still opens the filter menu, so that mobile users
can still add/remove filters, just without the ability to search through
them.
Styles are also modified to make the search input appear as a button by
overriding the default readonly and placeholder styles.
Bug: T225499, T223230
Change-Id: Iaa67369542e658d3571d957a204daa7a53d1e520
Translation updater bot [Tue, 30 Jul 2019 06:20:29 +0000 (08:20 +0200)]
Localisation updates from https://translatewiki.net.
Change-Id: I1b7b2936762e14eb43e9d777c3c3d198b66e4e6d
jenkins-bot [Tue, 30 Jul 2019 01:30:09 +0000 (01:30 +0000)]
Merge "Add SearchResultSetTrait"
jenkins-bot [Tue, 30 Jul 2019 01:29:33 +0000 (01:29 +0000)]
Merge "Add BaseSearchResultSet"
Timo Tijhof [Tue, 30 Jul 2019 00:17:35 +0000 (01:17 +0100)]
API: Create a module bundle for 'apipretty' and 'apihelp'
These are both fairly small modules used in related low-traffic
scenarios. The cost of registering both globally on all page views
as a top-level entry point does not seem worth the marginal gain
of loading only one of these two in the contexts where they are
needed.
Change-Id: I42458ebec3f8d6e14e52e44d62fb914fcbeda5db
Timo Tijhof [Mon, 29 Jul 2019 22:42:57 +0000 (23:42 +0100)]
context: Make the getSkin() fallback logic more explicit
Previously the first two post-hook checks where mutually exclusive
and the fallback was generic (not conditional) which means we
would also allow the first two conditions to succeed in a way that
leaves $this->skin as null.
Aside from that not being possible right now, it also duplicates a
null check in two places, which isn't ideal.
Codify that the first two blocks always result in $this->skin
being assigned non-null by using an 'else' branch instead of another
generic check.
Change-Id: I7986684bf1bb2daad3aaddfbcd2ca02e652f78c2
jenkins-bot [Mon, 29 Jul 2019 23:25:36 +0000 (23:25 +0000)]
Merge "Add explicit visibility to SearchResult methods"
jenkins-bot [Mon, 29 Jul 2019 23:25:29 +0000 (23:25 +0000)]
Merge "Add explicit visibility to ISearchResultSet methods"
Timo Tijhof [Mon, 29 Jul 2019 22:57:43 +0000 (23:57 +0100)]
context: Use getRawVal instead of getVal for 'uselang' and 'useskin'
Bug: T189966
Change-Id: I9db7b3f36f5457e80aa9b673bcb56deb83e47a18
jenkins-bot [Mon, 29 Jul 2019 21:59:09 +0000 (21:59 +0000)]
Merge "Update gradient mixins from OOUI, add horizontal-gradient"
jenkins-bot [Mon, 29 Jul 2019 21:41:27 +0000 (21:41 +0000)]
Merge "MessageCache: Restore 'loadedLanguages' tracking for load()"
jenkins-bot [Mon, 29 Jul 2019 21:21:39 +0000 (21:21 +0000)]
Merge "Deprecate several public properties on the block classes"
Thalia [Mon, 29 Jul 2019 20:10:27 +0000 (21:10 +0100)]
Deprecate several public properties on the block classes
Public methods for checking and setting these properties already
exist where needed. Also update the remaining direct uses of these
properties in core.
Change-Id: Icdef025c9700e625aeb2a07975e69f1b1cc2466c
Ed Sanders [Mon, 29 Jul 2019 20:07:31 +0000 (21:07 +0100)]
Update gradient mixins from OOUI, add horizontal-gradient
Change-Id: I31ab76ea938f29c3d39456f093268780a44c014e
jenkins-bot [Mon, 29 Jul 2019 19:50:55 +0000 (19:50 +0000)]
Merge "Fix SlotDiffRenderer documentation"
jenkins-bot [Mon, 29 Jul 2019 19:42:22 +0000 (19:42 +0000)]
Merge "rdbms: make DatabaseSqlite::open() also check DBO_DEFAULT"
jenkins-bot [Mon, 29 Jul 2019 19:34:55 +0000 (19:34 +0000)]
Merge "externalstore: use CONN_TRX_AUTOCOMMIT instead of IDatabase::clearFlag()"
jenkins-bot [Mon, 29 Jul 2019 19:11:55 +0000 (19:11 +0000)]
Merge "CopyTextLayout: Only select-all on focus"
Timo Tijhof [Mon, 29 Jul 2019 18:22:10 +0000 (19:22 +0100)]
MessageCache: Restore 'loadedLanguages' tracking for load()
This was removed in
97e86d934b3 in 2018 in favour of using
`$this->cache->has($code)`. This is a problem because there
are cases where only a narrow subset of that structure is
populated (by MessageCache->replace) without things like
$this->overridable (or anything else that MessageCache->load does)
having ocurred yet.
The assumption that keys are only added to $this->cache by
MessageCache->load (or after that method has been called) was
actually true at some point. But, this changed in 2017 when
commit
c962b480568e optimised MessageCache->replace to not call
MessageCache->load.
Bug: T208897
Change-Id: Ie8bb4a4793675e5f1454e65c427f3100035c8b4d
Lucas Werkmeister [Mon, 29 Jul 2019 17:12:17 +0000 (19:12 +0200)]
Fix documentation of languageinfo name prop
A separate lilang parameter existed in some patch sets of change
Ic66991cd85, but was ultimately abandoned again in favor of respecting
the general uselang parameter. Apparently I forgot to update the
documentation, though.
Change-Id: I2722f7a513c963bb9fec0308c413ae02e00851c6
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
jenkins-bot [Mon, 29 Jul 2019 13:11:57 +0000 (13:11 +0000)]
Merge "Remove TODO for unblockself"
RazeSoldier [Sat, 27 Jul 2019 15:38:54 +0000 (23:38 +0800)]
Make CliInstaller control the processing logic of the error
Previously, if there was an error during CLI installation,
CliInstaller::showStatusMessage() exited the script directly. The exit
timing of the script should be given to the caller, not the callee.
So, I coding:
[1] Remove `exit()` from CliInstaller::showStatusMessage()
[2] Make the callee to return Status, the caller determine how to handle these Status
[3] Strictly check the key database type instead of just outputting message
Bug: T46511
Change-Id: I72ffd33fe5c592b9ea78f37bae5a9c081295c624
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
Aaron Schulz [Sun, 28 Jul 2019 16:38:29 +0000 (12:38 -0400)]
rdbms: make DatabaseSqlite::open() also check DBO_DEFAULT
Change-Id: Ib21078dc9d4aa8cba6c5cb6c25868af328c1cab6
jenkins-bot [Sat, 27 Jul 2019 14:51:08 +0000 (14:51 +0000)]
Merge "objectcache: make "busyValue" stricter to avoid callback ambigiuity"
Timo Tijhof [Thu, 25 Jul 2019 22:57:08 +0000 (23:57 +0100)]
resourceloader: Merge $fileCache conditional blocks
Also avoid conditional existence of variables ($fileCache). This avoids
isset(), which means we won't hide problems during refactor.
Raised by Codehealth (sonarcloud.io) as Major Code Smell:
> Merge this if statement with the enclosing one.
> https://sonarcloud.io/organizations/wmftest/rules?open=php%3AS1066&rule_key=php%3AS1066
Change-Id: Iacebbe6a68dac46cdfd1415a33a547d105b24b98
jenkins-bot [Sat, 27 Jul 2019 14:23:46 +0000 (14:23 +0000)]
Merge "import: Fix wrong/unspecific type hints in UploadSourceAdapter"
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
Aaron Schulz [Fri, 19 Jul 2019 10:31:46 +0000 (03:31 -0700)]
objectcache: make "busyValue" stricter to avoid callback ambigiuity
Change-Id: I01a1503ff5b37d65ef148fef79270505d8eb3146
Translation updater bot [Sat, 27 Jul 2019 06:18:05 +0000 (08:18 +0200)]
Localisation updates from https://translatewiki.net.
Change-Id: I3289a8380de64e080ec1f19e3a443e27795f9d51
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
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"
jenkins-bot [Fri, 26 Jul 2019 22:52:24 +0000 (22:52 +0000)]
Merge "QueryPage: allow arbitrary sorting"
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
Gergő Tisza [Fri, 26 Jul 2019 14:47:09 +0000 (16:47 +0200)]
Add QueryPage::delete method
Add a method for delete the cached result for a page. This is
useful for backlog-type query pages which provide some interface
for fixing the problem in-place.
Change-Id: I36b750d71b6551bb5c662e82c24f029db01acd3b
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"
jenkins-bot [Fri, 26 Jul 2019 20:24:18 +0000 (20:24 +0000)]
Merge "resourceloader: Remove internal 'wgResourceLoaderStorageEnabled' from mw.config"
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
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
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
jenkins-bot [Fri, 26 Jul 2019 16:09:39 +0000 (16:09 +0000)]
Merge "ApiSandbox: Fix upload widget"
Tim Starling [Thu, 25 Jul 2019 02:39:26 +0000 (12:39 +1000)]
rdbms: In the query log, show the server name in the message
So that it is possible to distinguish master queries from replica
queries. Useful when debugging issues such as T221763.
Change-Id: I38896efa46f2c7cf289e5bdc543a1692e251ec1d
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"
jenkins-bot [Fri, 26 Jul 2019 15:16:38 +0000 (15:16 +0000)]
Merge "rdbms: remove various deprecated methods"
jenkins-bot [Fri, 26 Jul 2019 15:11:15 +0000 (15:11 +0000)]
Merge "Fix exception when viewing special pages with relative related titles"
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
Aaron Schulz [Thu, 27 Jun 2019 08:13:13 +0000 (01:13 -0700)]
rdbms: remove various deprecated methods
Change-Id: I5ae923065a08078225b7df080cb92edca799ebaf
jenkins-bot [Fri, 26 Jul 2019 14:55:33 +0000 (14:55 +0000)]
Merge "Code cleanup related to initSpeculativePageId()"
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"
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
jenkins-bot [Fri, 26 Jul 2019 14:02:29 +0000 (14:02 +0000)]
Merge "Convert LoadBalancer::getConnection() callers to LoadBalancer::getConnectionRef()"
Tim Starling [Fri, 26 Jul 2019 06:39:16 +0000 (16:39 +1000)]
Code cleanup related to initSpeculativePageId()
Change-Id: I5b97c6292a28df6633c573a05c89210b096db5a8
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
jenkins-bot [Fri, 26 Jul 2019 06:34:14 +0000 (06:34 +0000)]
Merge "MediumSpecificBagOStuff: Make convertToRelative(0) return 0, not 1"
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
Antoine Musso [Thu, 25 Jul 2019 23:34:13 +0000 (01:34 +0200)]
selenium: stop running extensions/skins specs
So that we can use different framework and let developers easily upgrade
webdriver.io, selenium tests for extensions and skins must now be run
directly at the root of the extension or skin:
cd extensions/Foobar
npm install
npm run-script selenium-test
All repositories had the entry point introduced and Quibble 0.0.34
supports that new scheme. Thus Wikimedia CI runs extensions / skins
tests twice: once via mediawiki/core and once via the 'selenium-test'
script.
Remove the glob specs for extensions / skins from wdio.conf.
Bug: T199116
Change-Id: If19db4e45b56989e2c15240a9ed0e8a55a940fb9
jenkins-bot [Fri, 26 Jul 2019 01:50:56 +0000 (01:50 +0000)]
Merge "API: Only take HTTP code from ApiUsageException"
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
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
jenkins-bot [Thu, 25 Jul 2019 23:53:40 +0000 (23:53 +0000)]
Merge "resourceloader: Improve ResourceLoaderWikiModule test coverage"
jenkins-bot [Thu, 25 Jul 2019 23:26:05 +0000 (23:26 +0000)]
Merge "objectcache: let BagOStuff::getWithSetCallback() callbacks modify the TTL"
jenkins-bot [Thu, 25 Jul 2019 23:06:31 +0000 (23:06 +0000)]
Merge "resourceloader: Remove incomprehensible `@todo` in getTestModuleNames()"
jenkins-bot [Thu, 25 Jul 2019 23:03:55 +0000 (23:03 +0000)]
Merge "phpunit: Avoid get_class() in MediaWikiCoversValidator"
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
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
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
jenkins-bot [Thu, 25 Jul 2019 22:29:33 +0000 (22:29 +0000)]
Merge "Enable RecentChanges modules on mobile"
jdlrobson [Thu, 25 Jul 2019 21:41:58 +0000 (14:41 -0700)]
Enable RecentChanges modules on mobile
Change-Id: I9ec4b70390700cd697faeffd8f70c67e9c542e82
jenkins-bot [Thu, 25 Jul 2019 21:42:32 +0000 (21:42 +0000)]
Merge "Improve type hints in export related classes"
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"
jenkins-bot [Thu, 25 Jul 2019 21:23:58 +0000 (21:23 +0000)]
Merge "Type hint against LinkTarget in WatchedItemStore"
Translation updater bot [Thu, 25 Jul 2019 20:39:50 +0000 (22:39 +0200)]
Localisation updates from https://translatewiki.net.
Change-Id: I32ed9eb31204d18421f9d986d049feca65fbb62e
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
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()"
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
jenkins-bot [Thu, 25 Jul 2019 16:45:52 +0000 (16:45 +0000)]
Merge "Update documentation for $wgAutopromote"
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
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
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
David Causse [Thu, 25 Jul 2019 13:48:34 +0000 (15:48 +0200)]
Add SearchResultSetTrait
trait meant to hold methods that rarely overridden or that are
non trivial to implement.
Bug: T228626
Change-Id: I4fba27b22860109d648e830a435d4a036d26ad06
jenkins-bot [Thu, 25 Jul 2019 13:47:15 +0000 (13:47 +0000)]
Merge "Replace wfGetDB in ParserTestRunner"
David Causse [Thu, 25 Jul 2019 12:11:06 +0000 (14:11 +0200)]
Add BaseSearchResultSet
Meant to hold the B/C behaviors and be the base class implemented
by extensions.
Bug: T228626
Change-Id: I072a9bd0f94bd785d1ff51f0e6ee13790e37b417
jenkins-bot [Thu, 25 Jul 2019 13:36:09 +0000 (13:36 +0000)]
Merge "MimeAnalyzer: fix ZIP parsing failure"
jenkins-bot [Thu, 25 Jul 2019 10:41:07 +0000 (10:41 +0000)]
Merge "parser: inject a Logger into Parser instead of using wfDebug()"
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
jenkins-bot [Wed, 24 Jul 2019 22:41:53 +0000 (22:41 +0000)]
Merge "Do not block autopromote on partial blocks"
Thalia [Wed, 24 Jul 2019 22:21:06 +0000 (23:21 +0100)]
Update documentation for $wgAutopromote
Follow-up to
1ad840da68
Change-Id: I7c2dedf3824154c0c844f73a98e6824fe8ff141a
jenkins-bot [Wed, 24 Jul 2019 22:01:08 +0000 (22:01 +0000)]
Merge "Remove deprecated handling of array keys for $wgProxyList"
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
Thalia [Wed, 24 Jul 2019 17:17:36 +0000 (18:17 +0100)]
Remove deprecated handling of array keys for $wgProxyList
Change-Id: Ic9cc2a5585180ab57fd361342cbac8210b094a5c