lhc/web/wiklou.git
5 years agoMerge "BlockLevelPass: further fixes for T218817"
jenkins-bot [Wed, 20 Mar 2019 21:45:20 +0000 (21:45 +0000)]
Merge "BlockLevelPass: further fixes for T218817"

5 years agoAvoid counting input lines twice in BlockLevelPass::execute()
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

5 years agoBlockLevelPass: further fixes for T218817
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

5 years agoValidate the output of the dump scripts.
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

5 years agoMerge "Localisation updates from https://translatewiki.net."
jenkins-bot [Wed, 20 Mar 2019 20:58:59 +0000 (20:58 +0000)]
Merge "Localisation updates from https://translatewiki.net."

5 years agoobjectcache: convert APC and hash BagOStuff to using mergeViaCas()
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

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 20 Mar 2019 20:56:08 +0000 (21:56 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I213ca5e0b1b5fc1bfb666d1246086b3ed5f2866b

5 years agoparser: Count occurrences of newlines
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

5 years agoMerge "context: Cleanup is_null() checks and irrelevant else code paths"
jenkins-bot [Wed, 20 Mar 2019 20:16:29 +0000 (20:16 +0000)]
Merge "context: Cleanup is_null() checks and irrelevant else code paths"

5 years agoobjectcache: optimize merge()/incr() for WinCacheBagOStuff
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

5 years agocollation: Use `self` to reference same class instead of class name
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

5 years agocontext: Cleanup is_null() checks and irrelevant else code paths
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

5 years agoMerge "db: Remove property assignment overriden by constructor"
jenkins-bot [Wed, 20 Mar 2019 19:35:07 +0000 (19:35 +0000)]
Merge "db: Remove property assignment overriden by constructor"

5 years agoMerge "objectcache: make BagOStuff::changeTTL() more atomic"
jenkins-bot [Wed, 20 Mar 2019 19:04:24 +0000 (19:04 +0000)]
Merge "objectcache: make BagOStuff::changeTTL() more atomic"

5 years agodb: Use brackets `()` in operation for better readability
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

5 years agodb: Remove property assignment overriden by constructor
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

5 years agoobjectcache: make BagOStuff::changeTTL() more atomic
Aaron Schulz [Wed, 20 Mar 2019 16:46:33 +0000 (09:46 -0700)]
objectcache: make BagOStuff::changeTTL() more atomic

Change-Id: I86493498ef3359046b12d51795cf7875af6c3a6c

5 years agoFix phpstorm IDEA errors in SkinTemplate
Aaron Schulz [Wed, 20 Mar 2019 14:04:30 +0000 (07:04 -0700)]
Fix phpstorm IDEA errors in SkinTemplate

Change-Id: Icf2f80f7b1aade61cd0c766113efecae3baf4bd5

5 years agoMerge "storage: Fix typo in NameTableStore::purgeWANCache comments"
jenkins-bot [Wed, 20 Mar 2019 09:24:22 +0000 (09:24 +0000)]
Merge "storage: Fix typo in NameTableStore::purgeWANCache comments"

5 years agoAdd support for Element Timing API
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

5 years agoFix typo in McrSchemaOverride
Aaron Schulz [Wed, 20 Mar 2019 03:35:51 +0000 (20:35 -0700)]
Fix typo in McrSchemaOverride

Change-Id: Ifedb6276d9b4188e2aacacf38bf608f7ea36201b

5 years agoFix fatal due to lock name mismatch in Maintenance::unlockSearchindex
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

5 years agoMerge "Fix selectRow() parameters in PopulateCategory"
jenkins-bot [Wed, 20 Mar 2019 02:15:55 +0000 (02:15 +0000)]
Merge "Fix selectRow() parameters in PopulateCategory"

5 years agoMerge "Make BackupDumper MCR compatible (main slot only)"
jenkins-bot [Wed, 20 Mar 2019 02:15:43 +0000 (02:15 +0000)]
Merge "Make BackupDumper MCR compatible (main slot only)"

5 years agoMerge "Move the "v1" to an adjacent key component in Title::loadRestrictions"
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"

5 years agostorage: Fix typo in NameTableStore::purgeWANCache comments
Aaron Schulz [Tue, 19 Mar 2019 16:28:40 +0000 (09:28 -0700)]
storage: Fix typo in NameTableStore::purgeWANCache comments

Change-Id: Icdea7422cdb110877bb8991896e6ab8a83b02858

5 years agoMerge "Replace 'TablePager' CSS class exclusively by `mw-datatable`"
jenkins-bot [Wed, 20 Mar 2019 01:28:24 +0000 (01:28 +0000)]
Merge "Replace 'TablePager' CSS class exclusively by `mw-datatable`"

5 years agoMove the "v1" to an adjacent key component in Title::loadRestrictions
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

5 years agoImprove Caching in Title::loadRestrictions()
Andrew Green [Tue, 19 Mar 2019 22:16:11 +0000 (16:16 -0600)]
Improve Caching in Title::loadRestrictions()

Change-Id: I9a7edf6fc7d0bb0f4129fe13323964e9fae791f3

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 19 Mar 2019 20:54:09 +0000 (21:54 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I1b714edba904187e6b39f9e26f54b40f567453e7

5 years agoMerge "jquery.tablesorter: Never initialize twice on the same element"
jenkins-bot [Tue, 19 Mar 2019 20:09:14 +0000 (20:09 +0000)]
Merge "jquery.tablesorter: Never initialize twice on the same element"

5 years agoMerge "Remove block cookie stats measurement implementation"
jenkins-bot [Tue, 19 Mar 2019 19:35:57 +0000 (19:35 +0000)]
Merge "Remove block cookie stats measurement implementation"

5 years agordbms: make LBFactory::setLocalDomainPrefix preserve the schema
Aaron Schulz [Tue, 19 Mar 2019 15:59:19 +0000 (08:59 -0700)]
rdbms: make LBFactory::setLocalDomainPrefix preserve the schema

This avoids possible tests failures due to mismatched DB domain

Change-Id: Ic276d4f4567ce76ab395b6f7215242e84321f3bd

5 years agojquery.tablesorter: Never initialize twice on the same element
Ed Sanders [Wed, 13 Mar 2019 19:26:05 +0000 (19:26 +0000)]
jquery.tablesorter: Never initialize twice on the same element

Change-Id: I06725e62b2ee95e2d1d37348a633f9cbc156318d

5 years agoFix selectRow() parameters in PopulateCategory
Aaron Schulz [Tue, 19 Mar 2019 18:36:19 +0000 (11:36 -0700)]
Fix selectRow() parameters in PopulateCategory

Change-Id: Ib538657d5db889cd7c8a9ae694c60e92e13584f5

5 years agoMerge "Remove many references to db fields being retired as part of MCR Schema Migration"
jenkins-bot [Tue, 19 Mar 2019 18:09:30 +0000 (18:09 +0000)]
Merge "Remove many references to db fields being retired as part of MCR Schema Migration"

5 years agoMerge "debug: Disable flaky CeeFormatterTest"
jenkins-bot [Tue, 19 Mar 2019 16:39:34 +0000 (16:39 +0000)]
Merge "debug: Disable flaky CeeFormatterTest"

5 years agoMerge "Sync up with Parsoid parserTests.txt"
jenkins-bot [Tue, 19 Mar 2019 16:25:26 +0000 (16:25 +0000)]
Merge "Sync up with Parsoid parserTests.txt"

5 years agoRemove many references to db fields being retired as part of MCR Schema Migration
Bill Pirkle [Fri, 15 Mar 2019 15:59:41 +0000 (10:59 -0500)]
Remove many references to db fields being retired as part of MCR Schema Migration

Remove many references to database fields rev_text_id and ar_text_id,
which are being retired as part of MCR Schema Migration.
Some references remain, and will be removed under other patchsets
or other tasks.

Bug: T198341
Change-Id: Id044b8dcd7c9d09d5d6037eb732f6a105933f516

5 years agoMerge "rdbms: add bad mysql table/column codes to wasKnownStatementRollbackError()"
jenkins-bot [Tue, 19 Mar 2019 15:36:09 +0000 (15:36 +0000)]
Merge "rdbms: add bad mysql table/column codes to wasKnownStatementRollbackError()"

5 years agoSync up with Parsoid parserTests.txt
Arlo Breault [Tue, 19 Mar 2019 15:33:40 +0000 (11:33 -0400)]
Sync up with Parsoid parserTests.txt

This now aligns with Parsoid commit 94b8b491098f882582f372218df07f5b68f4eba1

Change-Id: I760e73c98109047e20e4c85b97853b9b3f50b090

5 years agodebug: Disable flaky CeeFormatterTest
Timo Tijhof [Tue, 19 Mar 2019 15:25:18 +0000 (15:25 +0000)]
debug: Disable flaky CeeFormatterTest

Follows-up 667b17a3193f0af0.

Bug: T218688
Change-Id: I70afc5b9c41ae8d593d71f27bc55b424d9de260c

5 years agoRemove block cookie stats measurement implementation
Dayllan Maza [Tue, 19 Mar 2019 15:12:08 +0000 (11:12 -0400)]
Remove block cookie stats measurement implementation

When setting a cookie on IP blocks was rolled out we wanted to
add some form of measurement to keep an eye on it. This patch is
removing that implementation 'cause it is not needed anymore.

Bug: T218596
Change-Id: I33ee164157b539560a3d88c6f3018dc013218640

5 years agoMerge "Revert "Split out new RefreshSecondaryDataUpdate class""
jenkins-bot [Tue, 19 Mar 2019 15:06:46 +0000 (15:06 +0000)]
Merge "Revert "Split out new RefreshSecondaryDataUpdate class""

5 years agoRevert "Split out new RefreshSecondaryDataUpdate class"
Timo Tijhof [Tue, 19 Mar 2019 03:01:43 +0000 (03:01 +0000)]
Revert "Split out new RefreshSecondaryDataUpdate class"

This reverts commits a1f7fd3adaa30ef02cd018901.

Bug: T218456
Change-Id: I9bbea3d13460ed44755d77fc61ff23fb906cf71e

5 years agoMerge "parser: Rename $lastSection to $lastParagraph"
jenkins-bot [Tue, 19 Mar 2019 14:37:54 +0000 (14:37 +0000)]
Merge "parser: Rename $lastSection to $lastParagraph"

5 years agoMerge "Revert "Temporarily trim leading/trailing whitespace from parser test clauses""
jenkins-bot [Tue, 19 Mar 2019 14:37:48 +0000 (14:37 +0000)]
Merge "Revert "Temporarily trim leading/trailing whitespace from parser test clauses""

5 years agoMerge "parser: Omit outputting newline after final line"
jenkins-bot [Tue, 19 Mar 2019 14:37:16 +0000 (14:37 +0000)]
Merge "parser: Omit outputting newline after final line"

5 years agoMerge "Remove rollback confirmation user preference"
jenkins-bot [Tue, 19 Mar 2019 14:36:36 +0000 (14:36 +0000)]
Merge "Remove rollback confirmation user preference"

5 years agoMerge "parser: Remove trailing newline after prefixes have been cleared"
jenkins-bot [Tue, 19 Mar 2019 14:18:30 +0000 (14:18 +0000)]
Merge "parser: Remove trailing newline after prefixes have been cleared"

5 years agoMerge "Temporarily trim leading/trailing whitespace from parser test clauses"
jenkins-bot [Tue, 19 Mar 2019 14:18:22 +0000 (14:18 +0000)]
Merge "Temporarily trim leading/trailing whitespace from parser test clauses"

5 years agoRemove rollback confirmation user preference
Tim Eulitz [Mon, 18 Mar 2019 13:40:09 +0000 (14:40 +0100)]
Remove rollback confirmation user preference

Due to a delay in the rollout of this feature, this part of the code has
to be temporarily removed again to prevent an unused setting from
popping up in the user settings.

Bug: T218556
Change-Id: I0f4e822fc25fddc2bc3c0b55b0792799a1e4c4ba

5 years agoMerge "Improve RemexStripTagHandler working with tables"
jenkins-bot [Tue, 19 Mar 2019 04:25:47 +0000 (04:25 +0000)]
Merge "Improve RemexStripTagHandler working with tables"

5 years agordbms: add bad mysql table/column codes to wasKnownStatementRollbackError()
Aaron Schulz [Tue, 19 Mar 2019 03:22:59 +0000 (20:22 -0700)]
rdbms: add bad mysql table/column codes to wasKnownStatementRollbackError()

Change-Id: I826681ae7582b6f8af09b1d5ed08378532af2556

5 years agoMerge "Use READ_EXCLUSIVE in SpecialConfirmEmail::attemptConfirm"
jenkins-bot [Tue, 19 Mar 2019 02:30:21 +0000 (02:30 +0000)]
Merge "Use READ_EXCLUSIVE in SpecialConfirmEmail::attemptConfirm"

5 years agoMerge "rdbms: document that IDatabase::selectFieldValues() keeps the order"
jenkins-bot [Tue, 19 Mar 2019 02:30:11 +0000 (02:30 +0000)]
Merge "rdbms: document that IDatabase::selectFieldValues() keeps the order"

5 years agoMerge "Make BagOStuff::incr abstract to discourage bad implementations"
jenkins-bot [Tue, 19 Mar 2019 01:45:48 +0000 (01:45 +0000)]
Merge "Make BagOStuff::incr abstract to discourage bad implementations"

5 years agoMerge "Define ManualLogEntryBeforePublish hook"
jenkins-bot [Tue, 19 Mar 2019 00:09:28 +0000 (00:09 +0000)]
Merge "Define ManualLogEntryBeforePublish hook"

5 years agoMerge "Replace $wgUser with RequestContext::getUser in User::getBlockedStatus"
jenkins-bot [Mon, 18 Mar 2019 23:52:33 +0000 (23:52 +0000)]
Merge "Replace $wgUser with RequestContext::getUser in User::getBlockedStatus"

5 years agoDefine ManualLogEntryBeforePublish hook
Piotr Miazga [Wed, 13 Mar 2019 20:16:39 +0000 (21:16 +0100)]
Define ManualLogEntryBeforePublish hook

This hook is required by extensions like MobileFrontend to tag
log entries when actions are performed on the mobile web.

There is a possibility to tag log entries by using
'RecentChange_save' hook, but that works only when the log entry
is published to 'rc' or 'rcandudp'. This means, that tagged log
will appear also on the Special:RecentChanges page which is something
what extensions like 'Thanks' wants to avoid.

In the future we should avoid using 'RecentChange_save' as an
indirect way to tag log entries, and use the
'ManualLogEntryBeforePublish' hook instead.

To cover ourselves in the future, instead of passing &$tags only,
we pass the $this (the log entry object) so extensions can perform
additional checks before using setTags().

Bug: T215675
Change-Id: I747eded4bc5406cd5d4676fc93b0bb55c99f9a4d

5 years agoReplace $wgUser with RequestContext::getUser in User::getBlockedStatus
Gergő Tisza [Mon, 18 Mar 2019 21:50:48 +0000 (14:50 -0700)]
Replace $wgUser with RequestContext::getUser in User::getBlockedStatus

$wgUser is not guaranteed to exist until MediaWiki has been fully
initialized; block status needs to be checked early on for
authentication-related permission checks.

Bug: T218608
Change-Id: I16315c071855024bc0412d5360c95f843420d9a9

5 years agoMake BagOStuff::incr abstract to discourage bad implementations
Aaron Schulz [Mon, 18 Mar 2019 23:09:26 +0000 (16:09 -0700)]
Make BagOStuff::incr abstract to discourage bad implementations

Callers should really use atomic TTL-preserving implementations
so that calling code works correctly. The old default base class
code did not do either.

Change-Id: Icf66db05e48b86c8d481dc08dc9041bd1fa6dbe9

5 years agoMerge "Make DeferredUpdates enqueue updates that failed to run when possible"
jenkins-bot [Mon, 18 Mar 2019 23:02:58 +0000 (23:02 +0000)]
Merge "Make DeferredUpdates enqueue updates that failed to run when possible"

5 years agoMerge "Provide a Taggable interface"
jenkins-bot [Mon, 18 Mar 2019 22:47:44 +0000 (22:47 +0000)]
Merge "Provide a Taggable interface"

5 years agoProvide a Taggable interface
Piotr Miazga [Thu, 28 Feb 2019 17:24:10 +0000 (18:24 +0100)]
Provide a Taggable interface

The Taggable interface defines how to tag objects in MediaWiki.
For now there are only two Taggable objects:
 - RecentChange
 - ManualLogEntries

This interface should be used in places where we want to optionally
tag things, for example:
 We want to tag all mobile web actions with 'web mobile edit'.

With that interface, we will be able to expect a Taggable object,
and call `addTags()` when we need to, without having a special check
to verify is it RecentChange, or is it ManualLogEntry. We will only
expect a Taggable object.

Additionally, added @deprecated note to ManualLogEntries::setTags()
as each call to this method will override all previous tags. This
action can be harmfull to parts of code that conditionally add tags.
If object was tagged in some way, we should preserve those tags.

If there are any special cases, where we want to override all tags,
we should provide `resetTags()` method.

Bug: T215675
Change-Id: Ia4c019db8ca6f37ce0f86bf7d134d6f1713daf56

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 18 Mar 2019 21:55:09 +0000 (22:55 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I7dea9fd7d9892ea16a33bf020f22957dbe29549c

5 years agoMerge "Mixin FlaggedElement to DateTimeInputWidget"
jenkins-bot [Mon, 18 Mar 2019 21:25:59 +0000 (21:25 +0000)]
Merge "Mixin FlaggedElement to DateTimeInputWidget"

5 years agoMerge "Urlencode fragments when redirecting after editing"
jenkins-bot [Mon, 18 Mar 2019 20:55:58 +0000 (20:55 +0000)]
Merge "Urlencode fragments when redirecting after editing"

5 years agoAdd optional jQuery event delegates in Confirmable
Tim Eulitz [Mon, 18 Mar 2019 16:11:56 +0000 (17:11 +0100)]
Add optional jQuery event delegates in Confirmable

Since we want to use the Confirmable on pages with dynamic content
(RecentChanges for example), we need to add support for event
delegation to confirmables, as this is the most reliable way to attach
the event to new elements on the page.

As a side effect, it should also improve performance since it
reduces the amount of event handlers needed for our use case.

Bug: T218354
Change-Id: I22bea39c371d329b40b76ebadc9b74e6d06bfe13

5 years agoMixin FlaggedElement to DateTimeInputWidget
Daimona Eaytoy [Mon, 18 Mar 2019 10:07:59 +0000 (11:07 +0100)]
Mixin FlaggedElement to DateTimeInputWidget

As consequence of Id46ca3b630a9d24bc4790c1aa8c6e15c95ea2e51.

Bug: T218513
Change-Id: Iaf1078971767224119138e47bb175094230c99a2

5 years agoUrlencode fragments when redirecting after editing
Max Semenik [Mon, 18 Mar 2019 05:42:42 +0000 (22:42 -0700)]
Urlencode fragments when redirecting after editing

This is a quick fix for the main symptom of the Chrome bug that results in
users being redirected to Special:BadTitle after section editing. We'll
need to discuss a more permanent solution.

Bug: T216029
Change-Id: I4b2d42ebc74031df86bc52310da71819da11c1ae

5 years agoMerge "Password: update documentation"
jenkins-bot [Mon, 18 Mar 2019 01:07:10 +0000 (01:07 +0000)]
Merge "Password: update documentation"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 17 Mar 2019 20:54:44 +0000 (21:54 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I2d4ac09f82c79444730cf9cf0c8f01fc5109b917

5 years agoPassword: update documentation
Max Semenik [Sun, 17 Mar 2019 19:44:19 +0000 (12:44 -0700)]
Password: update documentation

Change-Id: Ifd7afc48e301a7985c2dd9134a7ea75af9bfeb4b

5 years agoMerge "Make LinkCache::isCacheable include namespaces like NS_CATEGORY/NS_MODULE"
jenkins-bot [Sun, 17 Mar 2019 18:49:05 +0000 (18:49 +0000)]
Merge "Make LinkCache::isCacheable include namespaces like NS_CATEGORY/NS_MODULE"

5 years agoMerge "Advertise feeds only if $wgFeed is enabled"
jenkins-bot [Sun, 17 Mar 2019 16:33:19 +0000 (16:33 +0000)]
Merge "Advertise feeds only if $wgFeed is enabled"

5 years agorunJobs.php output something when the job queue is empty
RazeSoldier [Sun, 18 Feb 2018 17:31:29 +0000 (01:31 +0800)]
runJobs.php output something when the job queue is empty

If the job queue is empty, output "Job queue is empty."

Bug: T187628
Change-Id: I7d0925bd2995526b1a67148096e9543766a62da7

5 years agoUse READ_EXCLUSIVE in SpecialConfirmEmail::attemptConfirm
Aaron Schulz [Sun, 17 Mar 2019 05:35:43 +0000 (22:35 -0700)]
Use READ_EXCLUSIVE in SpecialConfirmEmail::attemptConfirm

Bug: T202149
Change-Id: I9abc9e653dcc0910a5eea1dad56b2432d33d3c44

5 years agoAdvertise feeds only if $wgFeed is enabled
saper [Sun, 28 Jan 2018 02:21:51 +0000 (03:21 +0100)]
Advertise feeds only if $wgFeed is enabled

Wikis with $wgFeed=false should not present an Atom icon on the RecentChanges/Watchlist.

Bug: T116145
Change-Id: Ic64f7f5115a77c42ed2b336f6996fe711b3822ba

5 years agoMerge "RELEASE-NOTES: Make more consistent and useful for sysadmins"
jenkins-bot [Sat, 16 Mar 2019 22:54:32 +0000 (22:54 +0000)]
Merge "RELEASE-NOTES: Make more consistent and useful for sysadmins"

5 years agoMerge "Various fixes for phan-taint-check"
jenkins-bot [Sat, 16 Mar 2019 22:12:55 +0000 (22:12 +0000)]
Merge "Various fixes for phan-taint-check"

5 years agoMerge "ProtectionForm: Follow up on I167ae6300b37d4e9292"
jenkins-bot [Sat, 16 Mar 2019 22:03:25 +0000 (22:03 +0000)]
Merge "ProtectionForm: Follow up on I167ae6300b37d4e9292"

5 years agoMerge "rdbms: improve database connection loss handling"
jenkins-bot [Sat, 16 Mar 2019 21:23:36 +0000 (21:23 +0000)]
Merge "rdbms: improve database connection loss handling"

5 years agoRELEASE-NOTES: Make more consistent and useful for sysadmins
James D. Forrester [Fri, 15 Mar 2019 00:58:24 +0000 (17:58 -0700)]
RELEASE-NOTES: Make more consistent and useful for sysadmins

* Move the "upgrading" bit further up, and put the notes specific
  to upgrading inside it.
* Word all configuration changes to start with the $wg… – rubric
  so they're easy to spot.
* Be explicit when new configuration options are temporary.
* Split user and developer features. Sysadmin features are what
  the "Configuration changes" section is for, so spell that out.

Change-Id: Id12ced8bb764f2c3945c14799d63c17e2711c6f6

5 years agoVarious fixes for phan-taint-check
Brian Wolff [Sun, 17 Feb 2019 11:47:41 +0000 (11:47 +0000)]
Various fixes for phan-taint-check

Change-Id: I56f42ef2d2e9b4f3c23e1e93d1a4d3db64f16de7

5 years agoProtectionForm: Follow up on I167ae6300b37d4e9292
Derick Alangi [Mon, 11 Mar 2019 09:34:23 +0000 (10:34 +0100)]
ProtectionForm: Follow up on I167ae6300b37d4e9292

Per code search string "\$this\-\>showLogExtract\( \$ou", method
is only called within the ProtectionForm class so can be safely
made private but there are methods with the same name in a class
like LogEventsList but do different things.

Inspired by @Thiemo's comment on I167ae6300b37d4e9292.

Change-Id: Ic4983ccffecc6285f848d6e926017c4c6df4855f

5 years agoCode style tweaks
Jack Phoenix [Fri, 15 Mar 2019 23:13:36 +0000 (01:13 +0200)]
Code style tweaks

Change-Id: I2c602ba642e5692e6c56817aac89be9058bf5bdb

5 years agoMake LinkCache::isCacheable include namespaces like NS_CATEGORY/NS_MODULE
Aaron Schulz [Thu, 14 Mar 2019 06:44:38 +0000 (23:44 -0700)]
Make LinkCache::isCacheable include namespaces like NS_CATEGORY/NS_MODULE

Category and module pages are some of the most frequently referenced

Change-Id: I6d29e883883cbea596b287494e75663d09130749

5 years agoMerge "User: Remove redundant wgClockSkewFudge code"
jenkins-bot [Sat, 16 Mar 2019 03:03:28 +0000 (03:03 +0000)]
Merge "User: Remove redundant wgClockSkewFudge code"

5 years agoMerge "Remove wgSitesCacheFile and rebuildSitesCache.php (unused)"
jenkins-bot [Sat, 16 Mar 2019 03:01:28 +0000 (03:01 +0000)]
Merge "Remove wgSitesCacheFile and rebuildSitesCache.php (unused)"

5 years agoMerge "Localisation updates from https://translatewiki.net."
jenkins-bot [Fri, 15 Mar 2019 23:17:41 +0000 (23:17 +0000)]
Merge "Localisation updates from https://translatewiki.net."

5 years agoMerge "Make EditPage::getTemplates avoid page table query spam"
jenkins-bot [Fri, 15 Mar 2019 23:11:11 +0000 (23:11 +0000)]
Merge "Make EditPage::getTemplates avoid page table query spam"

5 years agoMerge "rdbms: lower the log channel severity of LoadMonitor::getServerStates"
jenkins-bot [Fri, 15 Mar 2019 22:57:31 +0000 (22:57 +0000)]
Merge "rdbms: lower the log channel severity of LoadMonitor::getServerStates"

5 years agoMerge "Remove empty and unnecessary /* @{{ … */ comments"
jenkins-bot [Fri, 15 Mar 2019 22:03:29 +0000 (22:03 +0000)]
Merge "Remove empty and unnecessary /* @{{ … */ comments"

5 years agoMerge "Fix WatchedItemStore last-seen stashing logic"
jenkins-bot [Fri, 15 Mar 2019 21:46:07 +0000 (21:46 +0000)]
Merge "Fix WatchedItemStore last-seen stashing logic"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 15 Mar 2019 21:05:39 +0000 (22:05 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I910aa8cc077a12f2a7ef00f41087f5c3e08ab0d4

5 years agoCorrect API documentation for action=parse&prop=headhtml
brendajerop [Wed, 13 Mar 2019 07:59:19 +0000 (10:59 +0300)]
Correct API documentation for action=parse&prop=headhtml

The documentation stated that action=parse&prop=headhtml gives the
<head> element of the page, yet it returns the doctype, opening <html>,
<head> element, and opening <body> tag.

Bug: T139567
Change-Id: I864d53239c8f00a7e524d8ffb659f02dae957b03

5 years agoUser: Remove redundant wgClockSkewFudge code
Timo Tijhof [Fri, 15 Mar 2019 00:05:52 +0000 (00:05 +0000)]
User: Remove redundant wgClockSkewFudge code

Ensuring the new value is at least as high as 1 second higher
than the current value is sufficient.

The main code paths using this are checkAndSetTouched (for user group
changes) and saveSettings(), both of which use makeUpdateConditions() which
ensures we bail out if something else already wrote to it in the mean time.
As such, there is no longer a need to make sure our time is higher than
something another server may have written, given that is no longer something
we support.

This variable was introduced in 2005 (MW 1.4) with r9403 (1d12276bcb3),
and factored out as newTouchedTimestamp() in 2007 (MW 1.8)
with r16772 (c1094ba9876).

Change-Id: I940fb0dd125286a4a348c11e2c8d197f9288a75d

5 years agoRemove wgSitesCacheFile and rebuildSitesCache.php (unused)
Timo Tijhof [Thu, 14 Mar 2019 19:46:19 +0000 (19:46 +0000)]
Remove wgSitesCacheFile and rebuildSitesCache.php (unused)

This seems to have been intended as optimization for SiteStore,
but was never used as far as I can tell. Instead, SiteStore is
already cached via LocalServerCache (APC).

Keep the FileBasedSiteLookup class for one release cycle in case
third parties not indexed by MediaWiki Codesearch are using it.

== History

* 2013: Report of high memcached usage by Wikibase via SiteStore.
* 2014: Lazy-load the data in Wikibase (d3f2e99cb6).
* 2014: Implement the file-based cache (via T47532 and 90f6efc360fd5).
* 2015: Use local-server cache (APC), per T58602.

The file-based code was never used. The related task marked
invalid (T47532).

Change-Id: I8e2d9edcf3880149f824cc3de37793ca57435b49

5 years agoparser: Rename $lastSection to $lastParagraph
Arlo Breault [Fri, 15 Mar 2019 19:41:22 +0000 (15:41 -0400)]
parser: Rename $lastSection to $lastParagraph

This now at least matches the function names even though what's actually
meant is more like 'block-level tag'.  Section is a poor choice of name
since there're wikitext sections unrelated to this.

Change-Id: Ic83aff4d862800b778441c28884194480b7e7d96