lhc/web/wiklou.git
6 years agoMerge "New parameters 'reverse' and 'sortbyvalue' for Special:PagesWithProp"
jenkins-bot [Thu, 27 Jul 2017 16:25:01 +0000 (16:25 +0000)]
Merge "New parameters 'reverse' and 'sortbyvalue' for Special:PagesWithProp"

6 years agoChanging interwiki results header from <p> to <h2>
Jan Drewniak [Mon, 24 Jul 2017 15:44:02 +0000 (17:44 +0200)]
Changing interwiki results header from <p> to <h2>

Makes the header on interwiki results
(results from different languages on Special:Search)
bigger.

Bug: T146655
Change-Id: I10ea6f85f97b4c8a5e585b2b1090af68054cbe2c

6 years agoMerge "resourceloader: Include lessVars in FileModule definition summary"
jenkins-bot [Thu, 27 Jul 2017 14:42:09 +0000 (14:42 +0000)]
Merge "resourceloader: Include lessVars in FileModule definition summary"

6 years agoMerge "UserPager: Call text() on message, don't use it directly"
jenkins-bot [Thu, 27 Jul 2017 13:43:24 +0000 (13:43 +0000)]
Merge "UserPager: Call text() on message, don't use it directly"

6 years agoUserPager: Call text() on message, don't use it directly
Prateek Saxena [Thu, 27 Jul 2017 08:11:55 +0000 (13:41 +0530)]
UserPager: Call text() on message, don't use it directly

Bug: T171806
Change-Id: Ib9a1ae7b65f8a01542c61b192252f3bb3ded1236

6 years agoMerge "Re-introduce use of mime_content_type()"
jenkins-bot [Thu, 27 Jul 2017 03:05:45 +0000 (03:05 +0000)]
Merge "Re-introduce use of mime_content_type()"

6 years agoresourceloader: Include lessVars in FileModule definition summary
Timo Tijhof [Thu, 27 Jul 2017 01:53:37 +0000 (18:53 -0700)]
resourceloader: Include lessVars in FileModule definition summary

This already worked as expected for any module that uses the new
enableModuleContentVersion model, but for the majority of file modules
this is not yet the case for performance reasons. As such, make
sure lessVars are included in our manual tracking.

Include it conditionally to avoid changing the array for other modules,
which would needlessly invalidate their cache.

Bug: T171809
Change-Id: Ib250068e0ecfc29a09ca33c23bef901ee0482bf2

6 years agoRe-introduce use of mime_content_type()
Timo Tijhof [Tue, 25 Jul 2017 05:11:17 +0000 (22:11 -0700)]
Re-introduce use of mime_content_type()

Follows-up eac059c7224. See also https://stackoverflow.com/a/39676272/319266.

This function was never deprecated. For a short time, the www.php.net
manual page for `mime_content_type` wrongly documented it as having been
deprecated in PHP 5.3, but this wasn't true, and it has been present in
every PHP version since PHP 4.3, including PHP 7 and HHVM 2.3+.

Between PHP 4.3.0-4.3.2 and PHP 5.0-5.3, the function would be absent
if the Mimemagic extension was not enabled at compile-time. However, while
mime_content_type was first introduced by the Mimemagic PHP ext, it is
backend by the Finfo extension since PHP 5.3.0.

Confirmed via https://3v4l.org/IQC1Q.

* CSSMin: Revert conditional use of finfo back to unconditional use
  of mime_content_type.

* MimeAnalyzer: Replace conditional use of finfo with unconditional use
  use of mime_content_type. Also remove the now-redundant 'else' branch.
  The 'else' branch existed because this code was written at a time where
  MediaWiki still supported PHP 4, of which some minor versions could
  sometimes be compiled without this function.

Change-Id: Iee4a0b6f616a469bb779c40e386045f9c3200446

6 years agoMerge "Use double quotes instead of singe quotes for HTML attributes"
jenkins-bot [Wed, 26 Jul 2017 23:08:57 +0000 (23:08 +0000)]
Merge "Use double quotes instead of singe quotes for HTML attributes"

6 years agoMerge "Cap 'days' param in RC/Watchlist at $wgRCMaxAge"
jenkins-bot [Wed, 26 Jul 2017 23:02:31 +0000 (23:02 +0000)]
Merge "Cap 'days' param in RC/Watchlist at $wgRCMaxAge"

6 years agoUse double quotes instead of singe quotes for HTML attributes
Fomafix [Mon, 3 Jul 2017 06:51:10 +0000 (08:51 +0200)]
Use double quotes instead of singe quotes for HTML attributes

htmlspecialchars[1] encodes only double quotes not single quotes.
Therefor the HTML attribute must enclosed with double quotes for
correct output encoding.

[1] https://secure.php.net/manual/en/function.htmlspecialchars.php

Change-Id: I3fec5299585187ed70d62b9248007af34b0db85b

6 years agoMerge "rdbms: Ensure onTransactionPreCommitOrIdle() callbacks don't lead transactions"
jenkins-bot [Wed, 26 Jul 2017 22:25:44 +0000 (22:25 +0000)]
Merge "rdbms: Ensure onTransactionPreCommitOrIdle() callbacks don't lead transactions"

6 years agordbms: Ensure onTransactionPreCommitOrIdle() callbacks don't lead transactions
Aaron Schulz [Wed, 26 Jul 2017 09:04:34 +0000 (02:04 -0700)]
rdbms: Ensure onTransactionPreCommitOrIdle() callbacks don't lead transactions

If no writes started a transaction yet, the callback would run
but not commit (by design, joining the request round). Later
writes will then pile on top of it.

The point of this method is to avoid such cases, so this edge
case has been fixed.

Change-Id: I9b44b19261d679de4aff6e44a9cfeb4f684ce02e

6 years agoCap 'days' param in RC/Watchlist at $wgRCMaxAge
Roan Kattouw [Wed, 26 Jul 2017 02:46:37 +0000 (19:46 -0700)]
Cap 'days' param in RC/Watchlist at $wgRCMaxAge

Without this, setting the 'days' param to a very high value
causes exceptions while doing timestamp math.

Bug: T149890
Change-Id: I5aee5f027cced8860eb966e2d6bdb07764ce861a

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 26 Jul 2017 19:59:14 +0000 (21:59 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I48b125192ab8b55519f0d772cb36d1c9d3926dd0

6 years agoHide "hideuser" on Special:Block for non-infinite blocks
Eddie Greiner-Petter [Fri, 19 May 2017 13:49:20 +0000 (15:49 +0200)]
Hide "hideuser" on Special:Block for non-infinite blocks

Users with the hideuser right have an extra checkmark on Special:Block
to hide user, however this functionality can only be used on registered
users (not IPs) and only if a block is set to never expire. With this js
enhancement, hide the "hideuser" checkbox and label if the block time is
not set to infinite (either as selected from the dropdown or written
into the "other" input box).

Attribution to meta.wikimedia.org/wiki/User:Margott who uploaded a
draft for this patch on the task a while ago.

Bug: T133036
Change-Id: Ia8c3e25d923e1df57d5afd69e9de3d6f2543f628

6 years agoMerge "HTMLForm: Show more options when incorrect displayFormat is set"
jenkins-bot [Wed, 26 Jul 2017 18:54:03 +0000 (18:54 +0000)]
Merge "HTMLForm: Show more options when incorrect displayFormat is set"

6 years agoHTMLForm: Show more options when incorrect displayFormat is set
Prateek Saxena [Mon, 24 Jul 2017 18:37:14 +0000 (00:07 +0530)]
HTMLForm: Show more options when incorrect displayFormat is set

Change-Id: I47a4684f01f5e30629e819403d7445479c4607da

6 years agoMerge "Add urlencode for URL encoding of lang values"
jenkins-bot [Wed, 26 Jul 2017 14:23:16 +0000 (14:23 +0000)]
Merge "Add urlencode for URL encoding of lang values"

6 years agoRCFilters: Followup I78e23f85c3: Don't disable RCFilters system when fetching results
Moriel Schottlender [Wed, 26 Jul 2017 03:34:47 +0000 (20:34 -0700)]
RCFilters: Followup I78e23f85c3: Don't disable RCFilters system when fetching results

We disable and hide it only on first page load while we create the
system, but should not hide and disable the actual filter area
system.

Bug: T165286
Bug: T171671
Change-Id: Ifc9d3c02c0c118d48634b8df846e14bfa6ea294a

6 years agoMerge "jquery.tablesorter: Make tests QUnit 2 compatible (remove testCount)"
jenkins-bot [Wed, 26 Jul 2017 02:26:05 +0000 (02:26 +0000)]
Merge "jquery.tablesorter: Make tests QUnit 2 compatible (remove testCount)"

6 years agojquery.tablesorter: Make tests QUnit 2 compatible (remove testCount)
Timo Tijhof [Wed, 26 Jul 2017 02:02:16 +0000 (19:02 -0700)]
jquery.tablesorter: Make tests QUnit 2 compatible (remove testCount)

Follows-up 6418c54c45e602c6132. Missed these because they didn't
match my search pattern previously (I didn't account for the test
name being a variable instead of a string literal.)

Change-Id: Ieae82acc80719041712c8c18b8ddffe387ebe8cf

6 years agoSpecialUndelete: Remove commented-out code
Bartosz Dziewoński [Tue, 25 Jul 2017 17:20:31 +0000 (19:20 +0200)]
SpecialUndelete: Remove commented-out code

This has been commented-out since 2006 (8a42f0b1 / r14777).
I think it's safe to bet it won't be needed again.

Change-Id: Ice85b734803fd5e5d98692ca284a987f17712bc1

6 years agoMerge "Add some output messages to populatePPSortKey"
jenkins-bot [Wed, 26 Jul 2017 01:30:05 +0000 (01:30 +0000)]
Merge "Add some output messages to populatePPSortKey"

6 years agoMerge "RCFilters UI: Unbreak limit and days widgets in non-experimental mode"
jenkins-bot [Wed, 26 Jul 2017 01:08:56 +0000 (01:08 +0000)]
Merge "RCFilters UI: Unbreak limit and days widgets in non-experimental mode"

6 years agoFollow-up 2a04f2d: don't pass [''] as tag filter when tagfilter=''
Roan Kattouw [Wed, 26 Jul 2017 00:45:00 +0000 (17:45 -0700)]
Follow-up 2a04f2d: don't pass [''] as tag filter when tagfilter=''

Change-Id: I472ff9524840c01131995a884283ca426e133879

6 years agoRCFilters UI: Unbreak limit and days widgets in non-experimental mode
Roan Kattouw [Wed, 26 Jul 2017 00:40:47 +0000 (17:40 -0700)]
RCFilters UI: Unbreak limit and days widgets in non-experimental mode

Don't treat all views as experimental, only the namespace and tag ones.

Change-Id: I1ec014314217b52cdfd71ccfcf10d549bea55f6c

6 years agoFix Special:ListUsers "subpage parameter" handling
Bartosz Dziewoński [Wed, 26 Jul 2017 00:21:44 +0000 (02:21 +0200)]
Fix Special:ListUsers "subpage parameter" handling

* Set the form action to avoid the subpage being "stuck". This is
  apparently a common problem and a common workaround, hmm. The $self
  variable, curiously unused, seems to have been meant for this.
* Fix incorrect parameter name to display values from subpage
  parameters in the form, and preserve them after submission.

Bug: T171657
Change-Id: Ibeee545a1e9932dfe44165c34cb55ad87268b705

6 years agoMerge "ChangeTags: Remove $wgRequest abuse in modifyDisplayQuery()"
jenkins-bot [Wed, 26 Jul 2017 00:14:54 +0000 (00:14 +0000)]
Merge "ChangeTags: Remove $wgRequest abuse in modifyDisplayQuery()"

6 years agoMerge "Add unit tests for ChangeTags::modifyDisplayQuery()"
jenkins-bot [Wed, 26 Jul 2017 00:14:51 +0000 (00:14 +0000)]
Merge "Add unit tests for ChangeTags::modifyDisplayQuery()"

6 years agoMerge "RCFilters: Filter duplicates when filtering for multiple tags"
jenkins-bot [Wed, 26 Jul 2017 00:07:31 +0000 (00:07 +0000)]
Merge "RCFilters: Filter duplicates when filtering for multiple tags"

6 years agoMerge "RCFilters: Improve loading animation"
jenkins-bot [Tue, 25 Jul 2017 23:52:54 +0000 (23:52 +0000)]
Merge "RCFilters: Improve loading animation"

6 years agoAdd some output messages to populatePPSortKey
Reedy [Tue, 25 Jul 2017 23:47:58 +0000 (00:47 +0100)]
Add some output messages to populatePPSortKey

Change-Id: I8a78fd1575c6a79cd78288c4f1e53a35689d1205

6 years agoMerge "parserTests: Use "fallback" skin unless otherwise specified"
jenkins-bot [Tue, 25 Jul 2017 23:47:48 +0000 (23:47 +0000)]
Merge "parserTests: Use "fallback" skin unless otherwise specified"

6 years agoMerge "addRFCandPMIDInterwiki.php: Add trailing . to skipped message"
jenkins-bot [Tue, 25 Jul 2017 23:34:35 +0000 (23:34 +0000)]
Merge "addRFCandPMIDInterwiki.php: Add trailing . to skipped message"

6 years agoaddRFCandPMIDInterwiki.php: Add trailing . to skipped message
Reedy [Tue, 25 Jul 2017 23:23:44 +0000 (00:23 +0100)]
addRFCandPMIDInterwiki.php: Add trailing . to skipped message

Change-Id: If7966d1356605ae18857055ac5e6f8364187c414

6 years agoFollow-up 993ce4d: use pp_page for $lastPageValue, not pp_value
Roan Kattouw [Tue, 25 Jul 2017 23:20:37 +0000 (16:20 -0700)]
Follow-up 993ce4d: use pp_page for $lastPageValue, not pp_value

This caused the script to get in an infinite loop and never stop.

Change-Id: Ib28a033e82b76fd60005335b882a7f5d95ac6644

6 years agoMerge "Add a maintenance script for populating pp_sortkey"
jenkins-bot [Tue, 25 Jul 2017 23:00:58 +0000 (23:00 +0000)]
Merge "Add a maintenance script for populating pp_sortkey"

6 years agoRCFilters: Improve loading animation
Moriel Schottlender [Tue, 25 Jul 2017 19:50:39 +0000 (12:50 -0700)]
RCFilters: Improve loading animation

Bug: T165286
Bug: T171671
Change-Id: I78e23f85c3ba06cb32355859d426e9c19d69499c

6 years agoUpgrade QUnit from v1.23.1 to v2.4.0
Timo Tijhof [Mon, 17 Jul 2017 20:21:54 +0000 (15:21 -0500)]
Upgrade QUnit from v1.23.1 to v2.4.0

Source
 https://code.jquery.com/qunit/qunit-2.4.0.js
 https://code.jquery.com/qunit/qunit-2.4.0.css

Changelog
 https://github.com/qunitjs/qunit/blob/2.4.0/History.md

This release makes 'moduleStack' private, which means we can no
longer use it to detect nested modules. Change the method of
detection to be a local 'nested' variable that we toggle in
a wrapped version of any 'executeNow' callback, in which nesting
happens.

Bug: T170515
Change-Id: Ib4ed386990125a6c713cb4351408c8f7ae7c070f

6 years agoMerge "SpecialUndelete: Don't try to add a form to the page unless it exists"
jenkins-bot [Tue, 25 Jul 2017 21:51:29 +0000 (21:51 +0000)]
Merge "SpecialUndelete: Don't try to add a form to the page unless it exists"

6 years agoSpecialUndelete: Don't try to add a form to the page unless it exists
James D. Forrester [Mon, 24 Jul 2017 21:09:33 +0000 (14:09 -0700)]
SpecialUndelete: Don't try to add a form to the page unless it exists

Bug: T171523
Change-Id: I1083ce168797a698c76c3fdff4eac06edfb0ac6a

6 years agoAdd tests for Sanitizer::escapeId
Fomafix [Fri, 30 Jun 2017 10:20:19 +0000 (12:20 +0200)]
Add tests for Sanitizer::escapeId

The tests are transfered from mediawiki.util.test.js.

Change-Id: I3fccfab3a2cdf5ad115fc426b3d45ce905e2e609

6 years agoAdd parser tests for decoding of entities in indicator names
Fomafix [Fri, 30 Jun 2017 04:02:10 +0000 (06:02 +0200)]
Add parser tests for decoding of entities in indicator names

This change adds parser tests that test the current behavior of decoding
HTML entities in indicator names when generating the indicator IDs as
described in T104196.

The parser tests currently does not compare the generated HTML with
the ID.

With I88e8e2077e the tests get changed to the new behavior.

Change-Id: Id561c4a00ece09b4db381edfe0d5f98120cacf5e

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 25 Jul 2017 19:58:01 +0000 (21:58 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I6b3c261e8f61c25f86129b368993ba111cc8ad8c

6 years agoparserTests: Use "fallback" skin unless otherwise specified
Kunal Mehta [Thu, 20 Jul 2017 01:42:56 +0000 (18:42 -0700)]
parserTests: Use "fallback" skin unless otherwise specified

ParserOutput::getText() depends on the current skin to format edit
section links, which some (e.g. MinervaNeue) have customized. This
causes parser tests to fail when they expect the default edit section
link format.

Default to always using the built-in fallback skin when parsing, but
allow it to be overridden with a "skin=..." option.

We also have to override $wgOut in addition to the main RequestContext
since that's what ParserOutput uses.

Bug: T170880
Change-Id: Ib7f0bd15dd0a9255e1e5140907e800478b658b92

6 years agoMerge "JobQueue: Create a debugging queue"
jenkins-bot [Tue, 25 Jul 2017 18:43:45 +0000 (18:43 +0000)]
Merge "JobQueue: Create a debugging queue"

6 years agoMerge "Add WAN Cache to SiteStats::jobs"
jenkins-bot [Tue, 25 Jul 2017 18:30:58 +0000 (18:30 +0000)]
Merge "Add WAN Cache to SiteStats::jobs"

6 years agoMerge "Add parser tests for decoding of entities in IDs and fragments"
jenkins-bot [Tue, 25 Jul 2017 18:29:52 +0000 (18:29 +0000)]
Merge "Add parser tests for decoding of entities in IDs and fragments"

6 years agoAdd WAN Cache to SiteStats::jobs
Antoine Musso [Mon, 29 May 2017 21:58:33 +0000 (23:58 +0200)]
Add WAN Cache to SiteStats::jobs

The method hits the jobrunner backend to find out how many jobs are
enqueued in each of the JobQueue.  It is publicly available via the
MediaWiki API request:
    /w/api.php?action=query&meta=siteinfo&siprop=statistics

That is often used by bots when querying recent changes among other and
with fast bot cause useless queries toward the jobrunner backend.

Wrap SiteStats::jobs() with a WAN cache under key SiteStats:jobscount.
Drop SiteStats::$jobs private variable that was used for in process
cache. The WAN Cache does it for us via 'pcTTL'.

That is similar to SiteStats::numberingroup().
Set TTL to one minute, which should still give fresh enough results for
public uses.

Cover that behavior with a test.

When writing tests I noticed MediaWikiTestCase generates a few jobs due
to the creation of the UTPage page:

* HTMLCacheUpdateJob to refresh backlinks (eg: history)
* RecentChangesUpdateJob which happens randomly

Pass EDIT_SUPPRESS_RC to doEditContent to prevent the first and blindly
delete entries in the recentChangesUpdate jobqueue for the second.

Change-Id: I95a272d0691d779bfee9e7a671cbab66a113dfa1

6 years agoJobQueue: Create a debugging queue
Petr Pchelko [Thu, 25 May 2017 22:20:16 +0000 (15:20 -0700)]
JobQueue: Create a debugging queue

As a part of creating the kafka-based JobQueue implementation,
we need to transition to the new queue smoothly and be able to
first debug the event production side, then try executing a no-op
job in parallel with each of the real jobs (to be able to check
deduplication and all the jpb management code) and only then
try switching jobs one-by-one to the new backend queue.

In order to achieve that at first we need to temporary produce
both to the old job pipeline and to the new one - thus creating
a queue 'splitter' - it delegates all the methods to the main
queue while the produce requests also go to the EventBus.

This class it temporary, so it's marked deprecated right away.
It will not be needed once the queue transition is over.

Bug: T163380
Change-Id: I483b8f00f1c593ff3af6ba6826868b553339525f

6 years agoMerge "Add Saraiki (skr) to Names.php"
jenkins-bot [Tue, 25 Jul 2017 16:23:01 +0000 (16:23 +0000)]
Merge "Add Saraiki (skr) to Names.php"

6 years agoMerge "Title: Don't create mSubpages member variable"
jenkins-bot [Tue, 25 Jul 2017 15:03:41 +0000 (15:03 +0000)]
Merge "Title: Don't create mSubpages member variable"

6 years agoMerge "Revert "RCFilters: Hide hours temporarily since they don't work""
jenkins-bot [Tue, 25 Jul 2017 13:28:42 +0000 (13:28 +0000)]
Merge "Revert "RCFilters: Hide hours temporarily since they don't work""

6 years agoMerge "SpecialRecentchanges: Handle ?days= parameter more sanely"
jenkins-bot [Tue, 25 Jul 2017 13:22:40 +0000 (13:22 +0000)]
Merge "SpecialRecentchanges: Handle ?days= parameter more sanely"

6 years agoMerge "EnhancedChangesList: Don't render headings for empty days"
jenkins-bot [Tue, 25 Jul 2017 12:55:17 +0000 (12:55 +0000)]
Merge "EnhancedChangesList: Don't render headings for empty days"

6 years agoMerge "rdbms: Increase coverage for Database::selectSQLText()"
jenkins-bot [Tue, 25 Jul 2017 10:20:35 +0000 (10:20 +0000)]
Merge "rdbms: Increase coverage for Database::selectSQLText()"

6 years agoMerge "rdbms: Add more @covers to DatabaseSQLTest"
jenkins-bot [Tue, 25 Jul 2017 10:20:32 +0000 (10:20 +0000)]
Merge "rdbms: Add more @covers to DatabaseSQLTest"

6 years agoAdd parser tests for decoding of entities in IDs and fragments
Fomafix [Thu, 29 Jun 2017 10:06:56 +0000 (12:06 +0200)]
Add parser tests for decoding of entities in IDs and fragments

This change adds parser tests that test the current behavior of decoding
HTML entities in headings and links for IDs and fragments of links as
described in T103714.

With I88e8e2077e the tests get changed to the new behavior.

Change-Id: Ia79af95e53114c1154dd52769f2ad1ab673fdd9e

6 years agoMerge "Avoid using deprecated PreparedEdit::$pst"
jenkins-bot [Tue, 25 Jul 2017 02:58:07 +0000 (02:58 +0000)]
Merge "Avoid using deprecated PreparedEdit::$pst"

6 years agoMerge "WikiPage: Update comments related to new PreparedEdit object"
jenkins-bot [Tue, 25 Jul 2017 02:58:04 +0000 (02:58 +0000)]
Merge "WikiPage: Update comments related to new PreparedEdit object"

6 years agoMerge "MultiWriteBagOStuff: Fix async writes of mutable objects"
Krinkle [Tue, 25 Jul 2017 02:51:29 +0000 (02:51 +0000)]
Merge "MultiWriteBagOStuff: Fix async writes of mutable objects"

6 years agordbms: Increase coverage for Database::selectSQLText()
Timo Tijhof [Tue, 25 Jul 2017 02:49:17 +0000 (19:49 -0700)]
rdbms: Increase coverage for Database::selectSQLText()

* Add case for `$tables[0] == ' '`.
* Add case for `$tables == ''`.
* Add case for 'DISTINCT' option.
* Add case for 'FOR UPDATE' option.
* Add case for 'LOCK IN SHARE MODE' option.
* Add case for 'EXPLAIN' option.

Change-Id: I4a5f4754bc30d31ec35a085f39321fd358b6aa49

6 years agoMerge "config: Add more EtcdConfig::fetchAllFromEtcdServer tests"
jenkins-bot [Tue, 25 Jul 2017 02:46:38 +0000 (02:46 +0000)]
Merge "config: Add more EtcdConfig::fetchAllFromEtcdServer tests"

6 years agordbms: Add more @covers to DatabaseSQLTest
Timo Tijhof [Tue, 25 Jul 2017 02:21:12 +0000 (19:21 -0700)]
rdbms: Add more @covers to DatabaseSQLTest

Many of the main methods here have, over the years, been split up
into several protected/private methods.

Change-Id: I1b8489b1c61c0294288442a0a0cd28c9fa77f82e

6 years agoMerge "config: Fix invalid EtcdConfig return value after JSON parse error"
jenkins-bot [Tue, 25 Jul 2017 02:18:05 +0000 (02:18 +0000)]
Merge "config: Fix invalid EtcdConfig return value after JSON parse error"

6 years agoMultiWriteBagOStuff: Fix async writes of mutable objects
Brad Jorsch [Fri, 7 Jul 2017 13:51:00 +0000 (09:51 -0400)]
MultiWriteBagOStuff: Fix async writes of mutable objects

If someone writes an object into a BagOStuff, they typically expect that
later changes to the object will not affect the value stored.
MultiWriteBagOStuff's async write handling was violating this
expectation, which is potentially causing T168040.

Bug: T168040
Change-Id: Ie897b900befdc8998614af06f9339cd07665703e

6 years agoChangeTags: Remove $wgRequest abuse in modifyDisplayQuery()
Roan Kattouw [Sat, 15 Jul 2017 02:49:10 +0000 (19:49 -0700)]
ChangeTags: Remove $wgRequest abuse in modifyDisplayQuery()

If you omitted the $filter_tag parameter or set it to false,
this would go grab the 'tagfilter' query string parameter from
$wgRequest and use it instead.

Thankfully no callers (in core or extensions) used this scary
misfeature, so we can just remove it.

Change-Id: Ib5d1b9f90989903f99a0d163745879df24f45b6a

6 years agoAdd unit tests for ChangeTags::modifyDisplayQuery()
Roan Kattouw [Sat, 15 Jul 2017 02:39:49 +0000 (19:39 -0700)]
Add unit tests for ChangeTags::modifyDisplayQuery()

The rest of ChangeTags.php should have tests too, but this is a start.

Also fix up ChangeTags::modifyDisplayQuery() to work when strings
are passed for certain parameters, which its documentation claims
it supports but which leads to errors in practice. Normalize
these parameters to arrays.

Change-Id: I2fe61bcb716a369a14a45c2843817a6557d44f7c

6 years agoRevert "RCFilters: Hide hours temporarily since they don't work"
Catrope [Mon, 24 Jul 2017 23:49:33 +0000 (23:49 +0000)]
Revert "RCFilters: Hide hours temporarily since they don't work"

With support for fractional days values in the back end,
they now do work.

This reverts commit c7c112a8f219857fb5527713aaacb50a599ee1f6.

Change-Id: Ib15256d4541ecebdb29fe294c5285e63e37f9fee

6 years agoSpecialRecentchanges: Handle ?days= parameter more sanely
Roan Kattouw [Mon, 24 Jul 2017 23:38:59 +0000 (16:38 -0700)]
SpecialRecentchanges: Handle ?days= parameter more sanely

Allow fractional values (e.g ?days=0.25). Previously, fractional values
were rounded down (truncated) to integers.

When computing the cutoff timestamp, don't round down to midnight UTC.
This caused a strange phenomenon where ?days=1 would display between
24 and 48 hours' worth of changes depending on when you used it:
if the current time was 2017-07-24 23:59 UTC, the cutoff would be
set at 2017-07-23 00:00 UTC so you would see almost 48 hours' worth,
but if you refreshed two minutes later, the cutoff would be set at
2017-07-24 00:00 UTC and you should see just over 24 hours' worth.
In addition to this strangeness, it also made fractional values
somewhat meaningless and made a feature like "show only the last 3 hours"
impossible to implement.

Bug: T162784
Change-Id: I75b71324e29a4da09939c4b00feeb4cb556f797c

6 years agoMerge "SiteStats::jobs fix when there is a single job"
jenkins-bot [Mon, 24 Jul 2017 20:40:53 +0000 (20:40 +0000)]
Merge "SiteStats::jobs fix when there is a single job"

6 years agoRevert "Localisation updates from https://translatewiki.net."
Raimond Spekking [Mon, 24 Jul 2017 20:28:01 +0000 (20:28 +0000)]
Revert "Localisation updates from https://translatewiki.net."

Overwrites other patch

This reverts commit 21ff077363096ea72bd618fb5b46277276b59d30.

Change-Id: I3d1f5409209b0a1a2ef97e6750cbfb0b192a0a50

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 24 Jul 2017 20:23:56 +0000 (22:23 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I4c9054ef8d36fa36a73ca8f21d7a1c3c18d0581b

6 years agoconfig: Add more EtcdConfig::fetchAllFromEtcdServer tests
Timo Tijhof [Mon, 24 Jul 2017 19:50:47 +0000 (12:50 -0700)]
config: Add more EtcdConfig::fetchAllFromEtcdServer tests

Bug: T156924
Change-Id: I88a1c97b6921b59cce93f22d473dd7cea6f4931c

6 years agoMerge "ApiEmailUser: Add parentheses to fix output"
jenkins-bot [Mon, 24 Jul 2017 20:03:25 +0000 (20:03 +0000)]
Merge "ApiEmailUser: Add parentheses to fix output"

6 years agoconfig: Fix invalid EtcdConfig return value after JSON parse error
Timo Tijhof [Mon, 24 Jul 2017 19:48:38 +0000 (12:48 -0700)]
config: Fix invalid EtcdConfig return value after JSON parse error

Follows-up 1f2daa9132449b459d29e0110a21ea18.

Bug: T156924
Change-Id: I79b7e11b32e5be46c8ebdfb5c937e38e46301c0e

6 years agoMerge "RCFilters: Hide hours temporarily since they don't work"
jenkins-bot [Mon, 24 Jul 2017 19:49:50 +0000 (19:49 +0000)]
Merge "RCFilters: Hide hours temporarily since they don't work"

6 years agoMerge "CSSMin: Skip #default#behaviorName when detecting local files"
jenkins-bot [Mon, 24 Jul 2017 19:49:32 +0000 (19:49 +0000)]
Merge "CSSMin: Skip #default#behaviorName when detecting local files"

6 years agoApiEmailUser: Add parentheses to fix output
Brad Jorsch [Mon, 24 Jul 2017 19:47:17 +0000 (15:47 -0400)]
ApiEmailUser: Add parentheses to fix output

Stupid PHP ternary operator being left-associative.

Bug: T171416
Change-Id: Iddcbe0d75d583e4021a3aab47be4a4912c492f03

6 years agoRCFilters: Hide hours temporarily since they don't work
Moriel Schottlender [Mon, 24 Jul 2017 19:37:32 +0000 (12:37 -0700)]
RCFilters: Hide hours temporarily since they don't work

Change-Id: I5cdffb0a13db569cb824dd2ca2b5d9f69ad6b036

6 years agoRCFilters: Filter duplicates when filtering for multiple tags
Roan Kattouw [Mon, 10 Jul 2017 17:14:57 +0000 (10:14 -0700)]
RCFilters: Filter duplicates when filtering for multiple tags

When filtering for multiple tags, add DISTINCT to the query.
To make this not result in terrible query performance, we also
have to add the rc_id to the end of the ORDER BY, and add
a GROUP BY equal to the ORDER BY.

Make ChangeTags::modifyDisplayQuery() take an array of tags
instead of a pipe-separated string. This allows each caller
to explicitly opt into supporting multi-tag filters and the
conditional GROUP BY mess that that entails.

Only support multi-tag filters in SpecialRecentChanges and
SpecialRecentchangesLinked. This means we don't have to adapt
the queries in HistoryAction, ContribsPager, LogPager and
NewPagesPager to deal with a possible DISTINCT modifier.

Example query with no tag filters:
SELECT rc_id, ... FROM recentchanges ... ORDER BY rc_timestamp DESC

Example query with one tag filter:
SELECT rc_id, ... FROM recentchanges JOIN change_tag ON ...
WHERE ... AND ct_tag='foo' ORDER BY rc_timestamp DESC

Example query with two tag filters:
SELECT DISTINCT rc_id, ... FROM recentchanges JOIN change_tag ON ...
WHERE ... AND ct_tag IN ('foo', 'bar') GROUP BY rc_timestamp, rc_id
ORDER BY rc_timestamp DESC, rc_id DESC

Bug: T168501
Change-Id: I54a270a563d99b143b55ce83c7d6f70ac4861c64

6 years agoAdd doc for showEditTools method
WMDE-Fisch [Mon, 24 Jul 2017 16:58:18 +0000 (18:58 +0200)]
Add doc for showEditTools method

Change-Id: Ic6931ed6cdecb7b42e2c47b7c8b34b6d1d23be13

6 years agoMerge "Show legend of Special:SpecialPages more gradually"
jenkins-bot [Mon, 24 Jul 2017 15:44:30 +0000 (15:44 +0000)]
Merge "Show legend of Special:SpecialPages more gradually"

6 years agoShow legend of Special:SpecialPages more gradually
Umherirrender [Fri, 7 Jul 2017 15:15:43 +0000 (17:15 +0200)]
Show legend of Special:SpecialPages more gradually

The legend is shown when restricted or cached pages are shown, but for
cached pages the legend does not contains a text, because there is no
default styling of cached special pages.
Break the note into two messages and disable the message for cached
pages by default. Wikis having style for cached pages can use this
message to create a legend.

Change-Id: Iec429d450ba7019bbd2cd2301a8280a562341387

6 years agoMerge "Article: Remove unused variable"
jenkins-bot [Mon, 24 Jul 2017 14:48:05 +0000 (14:48 +0000)]
Merge "Article: Remove unused variable"

6 years agoMerge "UserPager: Use multiple checkboxes instead of multiselect"
jenkins-bot [Mon, 24 Jul 2017 11:00:00 +0000 (11:00 +0000)]
Merge "UserPager: Use multiple checkboxes instead of multiselect"

6 years agoArticle: Remove unused variable
Bartosz Dziewoński [Mon, 24 Jul 2017 09:18:54 +0000 (11:18 +0200)]
Article: Remove unused variable

Follow-up to 97a8fb78faa4ca2d9604140e5547f5deae5a2524.

Change-Id: I8822742f15c3972cec3ac2ec47a2f594453b8672

6 years agoMerge "WebInstaller: Use <div> instead of <span>"
jenkins-bot [Mon, 24 Jul 2017 07:48:59 +0000 (07:48 +0000)]
Merge "WebInstaller: Use <div> instead of <span>"

6 years agoMerge "RCFilters: Don't empty the changes list on first load"
jenkins-bot [Mon, 24 Jul 2017 07:19:29 +0000 (07:19 +0000)]
Merge "RCFilters: Don't empty the changes list on first load"

6 years agoWebInstaller: Use <div> instead of <span>
Fomafix [Mon, 24 Jul 2017 05:28:57 +0000 (07:28 +0200)]
WebInstaller: Use <div> instead of <span>

The parser output is enclosed by a <div> and must not enclosed into a
<span> because of an HTML validation error.

Bug: T171423
Change-Id: I034d54436a622803fe07d3c93483b9fe705bc925

6 years ago[SECURITY] Restore ability to suppress pages while deleting
Kunal Mehta [Sun, 23 Jul 2017 22:21:12 +0000 (15:21 -0700)]
[SECURITY] Restore ability to suppress pages while deleting

The OOUI refactor in 97a8fb78fa lost the ability to suppress pages while
deleting.

This converts the suppress checkbox into a OOUI one, and then modifies
the detection of whether the checkbox was used to use
WebRequest::getCheck().

Bug: T171405
Change-Id: I8c388808c08b8804689b41876fd2bcdeff7f0e70

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 23 Jul 2017 20:02:20 +0000 (22:02 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I134586d9e08c971826e4a8a019985ac34ddf13e0

6 years agoAdd Saraiki (skr) to Names.php
Amire80 [Sat, 22 Jul 2017 08:01:45 +0000 (11:01 +0300)]
Add Saraiki (skr) to Names.php

Bug: T171347
Change-Id: I145485b3d94ab2154a7dadbda166b16207f7c21c

6 years agoMerge "config: Add tests for EtcdConfig::fetchAllFromEtcdServer"
jenkins-bot [Sun, 23 Jul 2017 02:21:04 +0000 (02:21 +0000)]
Merge "config: Add tests for EtcdConfig::fetchAllFromEtcdServer"

6 years agoMerge "rdbms: Complete DatabaseDomain code coverage"
jenkins-bot [Sun, 23 Jul 2017 02:16:50 +0000 (02:16 +0000)]
Merge "rdbms: Complete DatabaseDomain code coverage"

6 years agoMerge "config: Complete coverage for Config class"
jenkins-bot [Sun, 23 Jul 2017 02:07:13 +0000 (02:07 +0000)]
Merge "config: Complete coverage for Config class"

6 years agoMerge "phpunit: Remove skins/ from coverage index"
jenkins-bot [Sun, 23 Jul 2017 02:07:10 +0000 (02:07 +0000)]
Merge "phpunit: Remove skins/ from coverage index"

6 years agoconfig: Add tests for EtcdConfig::fetchAllFromEtcdServer
Timo Tijhof [Sun, 23 Jul 2017 01:24:33 +0000 (18:24 -0700)]
config: Add tests for EtcdConfig::fetchAllFromEtcdServer

Follows-up 9b459d29e0110a21ea18.

Bug: T156924
Change-Id: Ib68c55ea3386a12e707f6d7d732da9fe727ccc2f

6 years agobuild: Update mediawiki/mediawiki-codesniffer to 0.10.1
Kunal Mehta [Sun, 23 Jul 2017 01:24:09 +0000 (18:24 -0700)]
build: Update mediawiki/mediawiki-codesniffer to 0.10.1

And auto-fix all errors.

The `<exclude-pattern>` stanzas are now included in the default ruleset
and don't need to be repeated.

Change-Id: I928af549dc88ac2c6cb82058f64c7c7f3111598a