Lucas Werkmeister [Fri, 22 Mar 2019 18:40:53 +0000 (19:40 +0100)]
resources: Rename a few local 'filterFn' vars to 'filterFunction'
Abbreviations are discouraged, so let’s use the full word.
Change-Id: I31fb4cca32d766559005d1291d6d22da3d74b5e6
Lucas Werkmeister [Fri, 22 Mar 2019 12:47:05 +0000 (13:47 +0100)]
Add filterFunction to visible{Byte,CodePoint}Limit
The underlying {byte,codePoint}Limit functions already supported this
parameter to apply to the string before limiting the length; add it to
the visible limiting functions as well, displaying the remaining
characters after the text is filtered.
Change-Id: Id8f039ef21ed64dd97c6711efa56d59bb0264669
jenkins-bot [Fri, 22 Mar 2019 11:43:27 +0000 (11:43 +0000)]
Merge "Remove i18n parameters"
Gabriel Birke [Fri, 22 Mar 2019 11:10:45 +0000 (12:10 +0100)]
Remove i18n parameters
Since the confirmation message can no longer show the edit count, remove
the data attribute that contains it.
Also make the selector for the confirmation more specific.
This is a followup for change 498096
Bug: T218354
Change-Id: I08dd75d3b161d7869357e486b25693dde635eb14
addshore [Fri, 22 Mar 2019 10:25:11 +0000 (11:25 +0100)]
Fix WANObjectCache typo in phpdoc
Change-Id: I6b9d68bc4832fe71217d5c0ef66bebdfa9b459ce
jenkins-bot [Fri, 22 Mar 2019 09:22:41 +0000 (09:22 +0000)]
Merge "don't die producing xml files if rev text export conversion fails"
jenkins-bot [Fri, 22 Mar 2019 06:13:28 +0000 (06:13 +0000)]
Merge "Use mediawiki/mediawiki-phan-config 0.3.0"
Kunal Mehta [Thu, 21 Mar 2019 22:28:48 +0000 (15:28 -0700)]
Use mediawiki/mediawiki-phan-config 0.3.0
Use the library instead of duplicating most of the config/defaults that it
provides. MediaWiki core is different of course, so we have to override a
bunch of file/directory lists, but there was a lot being duplicated.
This is the first step in migrating to a newer phan version.
Change-Id: Ib5987ebdf208138d97e1aba8ef54438064063fe9
jenkins-bot [Fri, 22 Mar 2019 02:00:20 +0000 (02:00 +0000)]
Merge "rdbms: avoid connections on more lazy DBConnRef methods"
jenkins-bot [Fri, 22 Mar 2019 00:41:00 +0000 (00:41 +0000)]
Merge "rdbms: update wasQueryTimeout() for DatabaseMysqlBase"
jenkins-bot [Fri, 22 Mar 2019 00:39:12 +0000 (00:39 +0000)]
Merge "rdbms: add 1062 error code to DatabaseMysqlBase"
Aaron Schulz [Thu, 21 Mar 2019 12:51:28 +0000 (05:51 -0700)]
rdbms: avoid connections on more lazy DBConnRef methods
Also:
* Fixed LoadBalancer::getAnyOpenConnection for both
DB_MASTER and DB_REPLICA, which are not real indexes.
* Lock down DBConnRef::close since it can only cause trouble.
* Relax DBConnRef restrictions on tablePrefix()/dbSchema()
for the harmless "getter" mode case.
* Remove redundant DatabasePostgres::getServer definition.
Change-Id: Ia855d901cc3c28147e52284fdabb1645805d4466
jenkins-bot [Fri, 22 Mar 2019 00:30:53 +0000 (00:30 +0000)]
Merge "Support more coupled DBs in AtomicSectionUpdate/AutoCommitUpdate"
Aaron Schulz [Thu, 21 Mar 2019 21:22:34 +0000 (14:22 -0700)]
rdbms: update wasQueryTimeout() for DatabaseMysqlBase
Change-Id: I533d68972c758a5c8bb251cd838b8802799f0318
jenkins-bot [Fri, 22 Mar 2019 00:19:30 +0000 (00:19 +0000)]
Merge "rdbms: make LBFactory::setLocalDomainPrefix preserve the schema"
Aaron Schulz [Thu, 21 Mar 2019 23:54:46 +0000 (16:54 -0700)]
rdbms: add 1062 error code to DatabaseMysqlBase
See https://dev.mysql.com/doc/refman/5.7/en/server-error-reference.html
Change-Id: Id4960a5693332e6291ddcb5564bf6f8177a90c3d
jenkins-bot [Fri, 22 Mar 2019 00:14:45 +0000 (00:14 +0000)]
Merge "Title: Test the ->equals() method more thoughroughly"
jenkins-bot [Fri, 22 Mar 2019 00:13:05 +0000 (00:13 +0000)]
Merge "Fix fatal due to lock name mismatch in Maintenance::unlockSearchindex"
jenkins-bot [Fri, 22 Mar 2019 00:05:01 +0000 (00:05 +0000)]
Merge "rdbms: restrict more unsafe IDatabase methods in DBConnRef"
jenkins-bot [Thu, 21 Mar 2019 23:55:30 +0000 (23:55 +0000)]
Merge "objectcache: convert APC and hash BagOStuff to using mergeViaCas()"
jenkins-bot [Thu, 21 Mar 2019 23:55:20 +0000 (23:55 +0000)]
Merge "objectcache: optimize merge()/incr() for WinCacheBagOStuff"
James D. Forrester [Sat, 16 Mar 2019 19:40:13 +0000 (12:40 -0700)]
Title: Test the ->equals() method more thoughroughly
Move from TitleMethodTest to TitleTest for simplicity with duplicating
into TitleValueTest. We're not using the language- and namespace-specific
test setup with these tests anyway.
Change-Id: Ieec78c35f04faea5e01da8d39ed88f7c4876ac84
jenkins-bot [Thu, 21 Mar 2019 23:52:50 +0000 (23:52 +0000)]
Merge "Fix phpstorm IDEA errors in SkinTemplate"
Aaron Schulz [Thu, 21 Mar 2019 23:17:25 +0000 (16:17 -0700)]
rdbms: restrict more unsafe IDatabase methods in DBConnRef
Change-Id: I1933da825e6b20b4ec742e0aa39d63e9a75f9a1c
jenkins-bot [Thu, 21 Mar 2019 22:45:50 +0000 (22:45 +0000)]
Merge "Do not create new archive file names for old files"
jenkins-bot [Thu, 21 Mar 2019 22:03:18 +0000 (22:03 +0000)]
Merge "RevDel: Avoid log_search rows with empty values for target_author_actor"
Translation updater bot [Thu, 21 Mar 2019 21:12:00 +0000 (22:12 +0100)]
Localisation updates from https://translatewiki.net.
Change-Id: I0dd7b417499db34a6b99d3491c34e361e84a5b9e
Aaron Schulz [Thu, 21 Mar 2019 21:05:35 +0000 (14:05 -0700)]
Support more coupled DBs in AtomicSectionUpdate/AutoCommitUpdate
This is useful for updating a secondary database based on a
commit to the main one, especially for using auto-commit.
Change-Id: Iad9084d2fb0490ecdfd5fcc97db33bfbcbfa5d21
Brad Jorsch [Thu, 7 Feb 2019 16:16:32 +0000 (11:16 -0500)]
RevDel: Avoid log_search rows with empty values for target_author_actor
During migration, RevDel may wind up being used on items where an actor
has not been assigned yet. The code creating log_search rows for
target_author_actor needs to take this into account.
Also, to clean this up on Wikimedia wikis, I've added code to
MigrateActors to delete these rows before (re-)migrating log_search
and a --tables option so a re-run can skip trying to process all the
already-processed tables (cf. T188327#
4892827).
Bug: T215525
Change-Id: Ica15e2e30445e23761e6d3d6405b3eb39a086161
Fomafix [Thu, 21 Mar 2019 19:36:52 +0000 (20:36 +0100)]
WebRequest: Simplify getGPCVal
* Call $contLang->checkTitleEncoding() only with a string value as
parameter. (A boolean value here caused T218883.)
* MediaWikiServices::getInstance()->getContentLanguage() always return a
Language object. An exist check is not necessary.
Change-Id: Idd3e3a2baa5072e862d7502e30079a1b33d6a866
jenkins-bot [Thu, 21 Mar 2019 17:35:46 +0000 (17:35 +0000)]
Merge "Use delegated events for rollback confirmable"
jenkins-bot [Thu, 21 Mar 2019 17:35:36 +0000 (17:35 +0000)]
Merge "Rearrange code in User::getBlockedStatus to avoid isAllowed calls"
Tim Eulitz [Thu, 21 Mar 2019 14:07:28 +0000 (15:07 +0100)]
Use delegated events for rollback confirmable
This change is necessary to make the rollback confirmation work even
when the list of items which can be rolled back is updated via
JavaScript (this is possible on RecentChanges, for example).
Bug: T218354
Change-Id: Idafe1380b283cf0056ff1efdffa04aca92cf1217
jenkins-bot [Thu, 21 Mar 2019 16:25:37 +0000 (16:25 +0000)]
Merge "Fixed typo 'implments' and 'implmented'"
jenkins-bot [Thu, 21 Mar 2019 16:08:56 +0000 (16:08 +0000)]
Merge "Remove deprecated handling of multiple arguments by the Block constructor"
Gergő Tisza [Thu, 21 Mar 2019 16:00:49 +0000 (09:00 -0700)]
Rearrange code in User::getBlockedStatus to avoid isAllowed calls
User::isAllowed() triggers session loading, which results in a loop
if it is called during session loading. Session providers need to
check block status when $wgBlockDisablesLogin is enabled, so try to
avoid isAllowed calls in that situation.
Bug: T218608
Change-Id: Iab24923c613d6aeed4b574f587fc4cee8f33077c
didicodes [Thu, 21 Mar 2019 15:10:02 +0000 (16:10 +0100)]
Fixed typo 'implments' and 'implmented'
Changed implments to implements
Changed implmented to implemented
Bug: T201491
Change-Id: I369a0079211ca798c6d44fb570035438769bfc32
jenkins-bot [Thu, 21 Mar 2019 15:12:36 +0000 (15:12 +0000)]
Merge "languages: Partial revert of I8287118cf8ec01326ead9"
jenkins-bot [Thu, 21 Mar 2019 14:36:02 +0000 (14:36 +0000)]
Merge "Correct API documentation for action=parse&prop=headhtml"
Thalia [Thu, 21 Mar 2019 14:34:48 +0000 (14:34 +0000)]
Remove deprecated handling of multiple arguments by the Block constructor
Also remove test for the deprecated functionality.
Bug: T218892
Change-Id: I37ab858494a173c6982bb16bf1c362d5dd790e23
Derick Alangi [Thu, 21 Mar 2019 14:26:16 +0000 (15:26 +0100)]
languages: Partial revert of I8287118cf8ec01326ead9
Fix bad value for parameter $s: must be a string production error.
Bug: T218883
Change-Id: I550f6cbc7fa9d290001ae0f2454cd1a46e672e0c
jenkins-bot [Thu, 21 Mar 2019 14:03:21 +0000 (14:03 +0000)]
Merge "Fix account create checkbox bug"
Tim Eulitz [Mon, 4 Mar 2019 15:40:45 +0000 (16:40 +0100)]
Implement temporary rollback confirmation toggle
This change implements a temporary feature toggle for the rollback
confirmation change. The main purpose is to allow users of certain wikis
(de-wiki, pl-wiki, for example) to turn off this upcoming feature before
it is released to production.
Bug: T217039
Change-Id: I6ed59afde5b75756053da3ae46858304dda9317d
jenkins-bot [Thu, 21 Mar 2019 12:56:17 +0000 (12:56 +0000)]
Merge "collation: Use `self` to reference same class instead of class name"
jenkins-bot [Thu, 21 Mar 2019 12:00:33 +0000 (12:00 +0000)]
Merge "Make the XML dump schema version configurable."
jenkins-bot [Thu, 21 Mar 2019 12:00:23 +0000 (12:00 +0000)]
Merge "Implement non-JS RollbackAction with form"
daniel [Fri, 14 Dec 2018 11:24:44 +0000 (12:24 +0100)]
Make the XML dump schema version configurable.
Bug: T174031
Change-Id: I979b6c8f0a72bc1f5ecce1d499d3fdfa0f671588
Tim Eulitz [Mon, 18 Feb 2019 13:32:05 +0000 (14:32 +0100)]
Implement non-JS RollbackAction with form
This change prepares a form for the RollbackAction to allow rollbacks to
be triggered via POST while also ensuring users are always prompted with
a request to confirm the rollback if the rollback confirmation prompt is
enabled.
Bug: T215303
Change-Id: Iaf7e095b3bb34072eea6bcac76ba29358b14cc09
tzhelyazkova [Thu, 28 Feb 2019 16:58:57 +0000 (17:58 +0100)]
Count number of usages for Rollback Confirmation Prompt
Bug: T215796
Change-Id: If8536955f4988440af053525ec9d761d4a60794c
jenkins-bot [Thu, 21 Mar 2019 10:54:16 +0000 (10:54 +0000)]
Merge "Add optional jQuery event delegates in Confirmable"
Thiemo Kreuz [Wed, 2 Jan 2019 14:34:59 +0000 (15:34 +0100)]
Do not create new archive file names for old files
When importing a previously archived file revision, \OldLocalFile::uploadOld()
calls \LocalFile::publishTo() with $dstRel pointing to a location in the
archive. It does not make sense to create a new archive file name for a file
that is already in the archive. Instead, use the existing archive file name.
* Note how $archiveName is not used in the code below, except as part of the
returned status.
* $archiveRel ends in \FileRepo::publishBatch(), but is barely used there
except for (again) the status.
* \FileRepo::publishBatch() makes use of the dirname() extracted from
$archiveRel. This patch does not make changes to this path, only to the
file name.
This is the most trivial patch we could think of to fix the bug that the
return value is not the documented one ("On success, the value member
contains the archive name").
This will be covered by the test introduced in I15fad26.
Bug: T200001
Bug: T210755
Change-Id: I28b782e9b41ed78ac1674111094335849e15ba49
Tim Eulitz [Tue, 5 Feb 2019 13:31:53 +0000 (14:31 +0100)]
Show confirmation prompt on rollback links
Bug: T215020
Change-Id: Ic831888e30808a20a04397912498fe2ca04f80ba
jenkins-bot [Thu, 21 Mar 2019 10:10:34 +0000 (10:10 +0000)]
Merge "Add a user preference to opt in or out of a confirmation prompt for rollbacks."
jenkins-bot [Thu, 21 Mar 2019 08:47:34 +0000 (08:47 +0000)]
Merge "resources: Add verifiable upstream for various jquery plugins"
tzhelyazkova [Thu, 21 Mar 2019 08:05:27 +0000 (09:05 +0100)]
Add a user preference to opt in or out of a confirmation prompt for rollbacks.
Bug: T199537
Change-Id: I2f08ef5f8c38f23b282e130d040681fc060b6b00
Aaron Schulz [Thu, 14 Mar 2019 07:55:50 +0000 (00:55 -0700)]
rdbms: support setting PRAGMA for synchronous in DatabaseSqlite
Change-Id: I74e2114627ecf3f32827dfe2923a8c0294879e92
Roan Kattouw [Wed, 16 Jan 2019 21:51:54 +0000 (13:51 -0800)]
WatchedItemStore: Use batching in setNotificationTimestampsForUser
Update rows in batches, using the same logic as is used by
removeWatchBatchForUser().
Also remove the functionality for updating all rows, and move that to
resetAllNotificationTimestampsForUser() instead. To that end, add a
timestamp parameter to that method and to the job it uses, and make
setNotificationTimestampsForUser() behave like a backwards-compatibility
wrapper around resetAllNotificationTimestampsForUser() when no list of
titles is specified.
Bug: T207941
Change-Id: I58342257395de6fcfb4c392b3945b12883ca1680
Follows-Up: I2008ff89c95fe6f66a3fd789d2cef0e8fe52bd93
Dayllan Maza [Tue, 12 Mar 2019 16:42:03 +0000 (12:42 -0400)]
Fix account create checkbox bug
When a block is being created on Special:Block, the "create account"
checkbox is checked by default if the block is set to "Sitewide" and
unchecked by default if the block is set to "partial".
There are multiple scenarios where the checkbox should not check and
uncheck according to the type of block.
1.- When editing a block. This means that an admin already saved the
the block so we shouldn't mess with the options
2.- After posting the form. An admin was ready to save and it didn't
happen for whatever reason. Still we shouldn't mess with the options
3.- After manually clicking the checkbox itself (already working before
this patch)
Bug: T216845
Change-Id: I39b723d1f638d016c74ec20639efeecac95d8cdd
jenkins-bot [Thu, 21 Mar 2019 02:31:56 +0000 (02:31 +0000)]
Merge "build: Remove git-depth:3 from Travis CI config"
Timo Tijhof [Thu, 21 Mar 2019 00:30:46 +0000 (00:30 +0000)]
build: Remove git-depth:3 from Travis CI config
Follows-up
236b7ae849.
The git-clone protocol does not support checking out a specific
commit directly. It requires that you clone first from a specific
branch (with an optional specified limited depth) and then you
can checkout a commit.
Limiting the depth means that the Travis CI build fails if when
the build starts at a time where there are at least N commits
in master after the one being tested.
This can happen if more than 3 commits merge within 15 minutes
of time (which is how long our Travis build takes roughly).
While that might seem unlikely given our Jenkins build take
about the same amount of time, our Zuul is able to anticipate
ahead of a merge and actually test many commits at once and then
once they all pass, merge them all at once.
Aside from that, one can also click "Restart" as repo admin in
Travis, which always fails for a past build basically.
Change-Id: I2a46821d6d78e637f03de0c4aa25a3488253ff1a
Timo Tijhof [Wed, 20 Mar 2019 23:57:38 +0000 (23:57 +0000)]
resources: Add verifiable upstream for various jquery plugins
* jStorage: Plain v0.4.12 release.
* throttle-debounce: Plain v1.1 release.
* jquery.form:
Plain release. (But they don't have a git tag for it).
* jquery.fullscreen:
This was a pre-release committed in
3fe5f92a26f02 to fix
a bug in IE11. We modified the header to indiciate which
unreleased hash it came from upstream. Shortly after that,
upstream released it proper (only the header was different).
* hoverIntent:
I accidentally modified this file in 2011 with
85d5e617d77a1f.
That (insignificant) change is now reverted.
Change-Id: Ibb1d368473b2a4b13795afedb66271a44e7e5bae
jenkins-bot [Wed, 20 Mar 2019 23:35:07 +0000 (23:35 +0000)]
Merge "Add support for Element Timing API"
jenkins-bot [Wed, 20 Mar 2019 23:30:55 +0000 (23:30 +0000)]
Merge "OOUI: Bring forward UBN fix for DropdownInputWidget with MenuSectionOptionWidget"
jenkins-bot [Wed, 20 Mar 2019 23:13:50 +0000 (23:13 +0000)]
Merge "Validate the output of the dump scripts."
James D. Forrester [Wed, 20 Mar 2019 23:10:11 +0000 (16:10 -0700)]
OOUI: Bring forward UBN fix for DropdownInputWidget with MenuSectionOptionWidget
Bug: T218722
Bug: T218830
Change-Id: Id220e5f71aa335e0c3abf572a9172c7c83376271
jenkins-bot [Wed, 20 Mar 2019 22:47:53 +0000 (22:47 +0000)]
Merge "Check whether a user is blocked from upload in ApiUpload"
jenkins-bot [Wed, 20 Mar 2019 22:31:48 +0000 (22:31 +0000)]
Merge "CSP: Minor cleanup in ContentSecurityPolicy.php"
Thalia [Wed, 20 Mar 2019 22:11:33 +0000 (22:11 +0000)]
Check whether a user is blocked from upload in ApiUpload
Partially blocked users are not blocked from uploading, so check
explicitly whether a user is blocked from uploading, rather than
simply whether they have a block.
Bug: T217255
Change-Id: I21089a90202941ec3bc5bdbf9c0d2e7cab00b365
Derick Alangi [Wed, 20 Mar 2019 21:51:56 +0000 (22:51 +0100)]
CSP: Minor cleanup in ContentSecurityPolicy.php
Cleanups include;
- Remove elseif() path for cases where if has a return state
and instead convert the elseif() into an if.
- Fix PHPDoc for non-existent parameter. Corrected parameter
name.
- Add @throws phpdoc annotation for a method that could throw
an exception.
- Remove unnecessary parentheses.
- Make sure line doesn't exceed 100 characters.
Change-Id: Ic2d882ae0c6f3859b5a268b1bfb50c8eafa294d9
jenkins-bot [Wed, 20 Mar 2019 21:53:24 +0000 (21:53 +0000)]
Merge "Avoid counting input lines twice in BlockLevelPass::execute()"
jenkins-bot [Wed, 20 Mar 2019 21:45:20 +0000 (21:45 +0000)]
Merge "BlockLevelPass: further fixes for T218817"
C. Scott Ananian [Wed, 20 Mar 2019 20:37:49 +0000 (16:37 -0400)]
Avoid counting input lines twice in BlockLevelPass::execute()
In T208070 / I120ca25a77b7b933de4afddd1d458e36a95e26da we added a
check whether we were processing the last line of input, in order
to avoid emitting extra trailing newlines. But if the number of
input lines is large, StringUtils::explode() will return an
iterator which doesn't implement Countable for efficiency.
I22eebb70af1b19d7c25241fc78bfcced4470e78a fixed this, but at the
cost of scanning the string twice: once just to count the number
of newlines before we begin to iterate over the lines.
This patch uses Iterator::valid() to determine if we're on the
last iteration without having to scan the string twice.
Bug: T208070
Bug: T218817
Change-Id: I41a45266d266195aa6002d3854e018cacf052ca6
Arlo Breault [Wed, 20 Mar 2019 21:02:39 +0000 (17:02 -0400)]
BlockLevelPass: further fixes for T218817
The previous fix for T218817 (I22eebb70af1b19d7c25241fc78bfcced4470e78a)
was a bit premature: we didn't notice that ExplodeIterator *also*
used a different Iterator::key() than ArrayIterator -- it used
the string position as a key, not the line number. Combined with
an inequality test for "not the last line" meant that almost every
line was now the "last line" and we were missing a lot of needed
newlines.
Count the lines ourselves to fix the problem.
Bug: T208070
Bug: T218817
Change-Id: I55a2c4c0ec304292162c51aa88b206fea0142392
daniel [Fri, 14 Dec 2018 11:06:45 +0000 (12:06 +0100)]
Validate the output of the dump scripts.
This introduces XML schema validation into the unit tests for
the backup dump scripts. This is intended to ensure that the
output keeps conforming to the schema when updating XmlDumpWriter
and friends to support newer schema versions.
Bug: T174031
Change-Id: Iafa8cb8ba5b3684a08172e92974edaf0482f19b7
jenkins-bot [Wed, 20 Mar 2019 20:58:59 +0000 (20:58 +0000)]
Merge "Localisation updates from https://translatewiki.net."
Aaron Schulz [Wed, 20 Mar 2019 17:57:02 +0000 (10:57 -0700)]
objectcache: convert APC and hash BagOStuff to using mergeViaCas()
This way, the $attempts parameter to merge() is respected and locks
are not held while possibly slow callbacks might run.
Also renamed confusingly named serialization functions in HashBagOStuff.
Change-Id: Id031d82e0a7c941936f04d2cdf590a6296777cf8
Translation updater bot [Wed, 20 Mar 2019 20:56:08 +0000 (21:56 +0100)]
Localisation updates from https://translatewiki.net.
Change-Id: I213ca5e0b1b5fc1bfb666d1246086b3ed5f2866b
Arlo Breault [Wed, 20 Mar 2019 20:32:10 +0000 (16:32 -0400)]
parser: Count occurrences of newlines
StringUtils::explode() returns an ExplodeIterator if the number of
separators is too high, which doesn't implement count.
So count the way that explode does.
Bug: T218817
Change-Id: I22eebb70af1b19d7c25241fc78bfcced4470e78a
jenkins-bot [Wed, 20 Mar 2019 20:16:29 +0000 (20:16 +0000)]
Merge "context: Cleanup is_null() checks and irrelevant else code paths"
Aaron Schulz [Wed, 20 Mar 2019 05:50:41 +0000 (22:50 -0700)]
objectcache: optimize merge()/incr() for WinCacheBagOStuff
Do not hold WinCache locks during merge() callbacks, as that
could be seconds of being blocked (and some callers do not
expect indefinite blocking). Make merge() use the CAS method
which only uses wincache_lock() after callback runs in very
tight getWithToken()/set() cycle.
Make incr() use wincache_lock() since it also is very tight
doGet()/set() cycle with negligable work in between.
Change-Id: I0dde6f62c7e3d4a802470c181570ad4353d0e6ea
Derick Alangi [Wed, 20 Mar 2019 20:00:03 +0000 (21:00 +0100)]
collation: Use `self` to reference same class instead of class name
With the use of `self`, even if the class name is changed (which is
very unlikely), then the code won't break. So it's a way of future
proofing the code.
Change-Id: Ib4046315b8aaee2e77af036893924962d25ceeb1
Derick Alangi [Wed, 20 Mar 2019 18:53:00 +0000 (19:53 +0100)]
context: Cleanup is_null() checks and irrelevant else code paths
This class specifically has these 2 things in many cases and converts
into the use of a tenary operations.
Quoting @Thiemo_WMDE from Gerrit comment: "The ?: operator will skip
empty arrays, empty strings, as well as the string "0". But this is
not a problem here because the properties under test are all objects.
Objects are always considered true in PHP."
Sample change can be seen below as, from;
```
if ( !is_null( $this->skin )) {
return $this->skin;
} else {
return $this->getContext()->getSkin();
}
```
to
```
return $this->skin ?: $this->getContext()->getSkin();
```
Change-Id: I377b118d86a24c7bcb15512f6714e6201a3e36ee
jenkins-bot [Wed, 20 Mar 2019 19:35:07 +0000 (19:35 +0000)]
Merge "db: Remove property assignment overriden by constructor"
jenkins-bot [Wed, 20 Mar 2019 19:04:24 +0000 (19:04 +0000)]
Merge "objectcache: make BagOStuff::changeTTL() more atomic"
Derick Alangi [Wed, 20 Mar 2019 16:24:35 +0000 (17:24 +0100)]
db: Use brackets `()` in operation for better readability
Wrap the expression into () to improve readability of the code.
Change-Id: Id53ea4709a7601fd1354833a44bd652570c733e6
Derick Alangi [Wed, 20 Mar 2019 17:36:03 +0000 (18:36 +0100)]
db: Remove property assignment overriden by constructor
As these class properties are overriden by the class constructor,
we can safely remove them. In addition, remove a useless "/" in a
PHPDoc.
Change-Id: I9cecfc8a0e5b58c931ee32c7465c064a9add1a77
Aaron Schulz [Wed, 20 Mar 2019 16:46:33 +0000 (09:46 -0700)]
objectcache: make BagOStuff::changeTTL() more atomic
Change-Id: I86493498ef3359046b12d51795cf7875af6c3a6c
Aaron Schulz [Wed, 20 Mar 2019 14:04:30 +0000 (07:04 -0700)]
Fix phpstorm IDEA errors in SkinTemplate
Change-Id: Icf2f80f7b1aade61cd0c766113efecae3baf4bd5
jenkins-bot [Wed, 20 Mar 2019 09:24:22 +0000 (09:24 +0000)]
Merge "storage: Fix typo in NameTableStore::purgeWANCache comments"
Gilles Dubuc [Tue, 19 Mar 2019 10:22:13 +0000 (11:22 +0100)]
Add support for Element Timing API
https://github.com/WICG/element-timing
Bug: T216598
Change-Id: Ieda41f5074784957760c17dc15f7c891e56b6795
Aaron Schulz [Wed, 20 Mar 2019 04:16:25 +0000 (21:16 -0700)]
Fix fatal due to lock name mismatch in Maintenance::unlockSearchindex
Change-Id: Id18c0c8eb20c215ba7421e087b721ac7dc57227a
Aaron Schulz [Wed, 20 Mar 2019 03:35:51 +0000 (20:35 -0700)]
Fix typo in McrSchemaOverride
Change-Id: Ifedb6276d9b4188e2aacacf38bf608f7ea36201b
jenkins-bot [Wed, 20 Mar 2019 02:15:55 +0000 (02:15 +0000)]
Merge "Fix selectRow() parameters in PopulateCategory"
jenkins-bot [Wed, 20 Mar 2019 02:15:43 +0000 (02:15 +0000)]
Merge "Make BackupDumper MCR compatible (main slot only)"
jenkins-bot [Wed, 20 Mar 2019 02:13:51 +0000 (02:13 +0000)]
Merge "Move the "v1" to an adjacent key component in Title::loadRestrictions"
Aaron Schulz [Tue, 19 Mar 2019 16:28:40 +0000 (09:28 -0700)]
storage: Fix typo in NameTableStore::purgeWANCache comments
Change-Id: Icdea7422cdb110877bb8991896e6ab8a83b02858
jenkins-bot [Wed, 20 Mar 2019 01:28:24 +0000 (01:28 +0000)]
Merge "Replace 'TablePager' CSS class exclusively by `mw-datatable`"
Aaron Schulz [Wed, 20 Mar 2019 01:21:18 +0000 (18:21 -0700)]
Move the "v1" to an adjacent key component in Title::loadRestrictions
This keeps the WAN cache statsd metrics under page-restrictions as before
Change-Id: I30b716cbc362c98f09ba77a4b3f68a821d966d44
Andrew Green [Tue, 19 Mar 2019 22:16:11 +0000 (16:16 -0600)]
Improve Caching in Title::loadRestrictions()
Change-Id: I9a7edf6fc7d0bb0f4129fe13323964e9fae791f3
Translation updater bot [Tue, 19 Mar 2019 20:54:09 +0000 (21:54 +0100)]
Localisation updates from https://translatewiki.net.
Change-Id: I1b714edba904187e6b39f9e26f54b40f567453e7