Commit graph

85589 commits

Author SHA1 Message Date
Fomafix
512aa4e551 Use PHP 7 '??' operator instead of if-then-else
Change-Id: Ia86f8433f30a166d38ee63d0d1745b26740767b9
2018-10-27 23:46:13 +02:00
jenkins-bot
3c25fc54a0 Merge "API: Set robots noindex,nofollow on HTML output" 2018-10-27 05:27:15 +00:00
jenkins-bot
7ddafd0db6 Merge "resoureloader: Restore support for plain callbacks in mediawiki.base's RLQ" 2018-10-27 04:03:43 +00:00
GeoffreyT2000
19dd287981 Increment edit count for all page moves
The user_editcount field should be incremented for all page moves, not just those done using Special:MovePage. Also, if talk pages and/or subpages are moved along with the base page, they will all be included in the edit count.

Bug: T195550
Change-Id: If75a45e4404ca7162b59bf85fa62a996383658b9
2018-10-26 23:35:01 +00:00
Timo Tijhof
cb7e0ea507 resoureloader: Restore support for plain callbacks in mediawiki.base's RLQ
Follows-up dec800968e, which moved the processing of callbacks that require
'modules' from startup.js to mediawiki.base.js.

In doing so, it made an incorrect assumption. It assumed that the simple
signature of RLQ.push(Function) is not needed after 'mediawiki.base' loads.

It is true that RLQ.push() is mostly an internal interface, and we only
use it from within the HTML output, and that once the async pipeline has
finished and startup.js has processed the simple callbacks, only calls with
secondary signatures remain in the queue.

But, while it is true that we don't use RLQ.push() outside the HTML, it is
not true that the HTML will fully load and execute inline scripts before
any of the async scripts execute. As such, the call to RLQ.push() in the
HTML footer was sometimes being ignored because 'mediawiki.base' had already
loaded by now.

Bug: T208093
Change-Id: I25012a2c6f41968b1b4f85614a3bc0416512d530
2018-10-26 14:33:26 -07:00
jenkins-bot
03157c14a9 Merge "Localisation updates from https://translatewiki.net." 2018-10-26 20:48:49 +00:00
jenkins-bot
cb4d4c4d8f Merge "Move user_editcount updates to a mergeable deferred update" 2018-10-26 20:32:24 +00:00
jenkins-bot
8e744f6f48 Merge "rdbms: add transaction comment to IDatabase::masterPosWait()" 2018-10-26 20:20:37 +00:00
jenkins-bot
a14a638d41 Merge "rdbms: fix connection reuse logic in LoadBalancer for postgres" 2018-10-26 20:20:32 +00:00
Translation updater bot
529ccd9e02 Localisation updates from https://translatewiki.net.
Change-Id: If9e3c1bf47afc4ee0f0c0afacebf3e32df62fb8c
2018-10-26 21:55:34 +02:00
Zoranzoki21
b6be5ec043 .gitignore: Fix .vscode
.vscode is directory

Change-Id: I82d1da1b51b4bd32423ad0bb70d30df109fae1ae
2018-10-26 13:34:21 +00:00
jenkins-bot
e099419868 Merge "RCFilters: Apply same distance to FilterItemHighlightButtons as other elements" 2018-10-26 10:50:38 +00:00
jenkins-bot
33fa9ff950 Merge "RCFilters: Cleanup 'Namespaces' dropdown borders appearance" 2018-10-26 10:50:33 +00:00
jenkins-bot
f96aaf6833 Merge "Remove unnecessary, unoptimized, unused overview SVG" 2018-10-26 03:04:20 +00:00
Tim Starling
a6a017cea4 Fix use of non-existent variable Parser::$config
Fix bug from Ib4394f370cb561ccf195338a1c2e9e465dcb3dc3

Add test.

Bug: T208000
Change-Id: Ia81cca1b64afef2af3cb8dff19719a7f0de9d306
2018-10-25 16:27:55 -07:00
Volker E
fc7b71e8d1 RCFilters: Apply same distance to FilterItemHighlightButtons as other elements
FilterItemHighlightButtons have lost vertical alignment with
“Highlight results”. This patch reintroduces it.

Change-Id: If5578564efced5f0ba4d3ca7ed3d6787b5b0ce3a
2018-10-25 15:59:17 -07:00
Aaron Schulz
390fce6db1 Move user_editcount updates to a mergeable deferred update
This should reduce excess contention and lock timeouts.
Previously, it used a pre-commit hook which ran just before the
end of the DB transaction round.

Also removed unused User::incEditCountImmediate() method.

Bug: T202715
Depends-on: I6d239a5ea286afb10d9e317b2ee1436de60f7e4f
Depends-on: I0ad3d17107efc7b0e59f1dd54d5733cd1572a2b7
Change-Id: I0d6d7ddd91bbb21995142808248d162e05696d47
2018-10-25 15:32:18 -07:00
Aaron Schulz
a58a9d5fce rdbms: add transaction comment to IDatabase::masterPosWait()
Change-Id: I95aa3b678b76cd06439d1feaba7f09a9c13f8931
2018-10-25 22:07:02 +00:00
Volker E
0233868b95 RCFilters: Cleanup 'Namespaces' dropdown borders appearance
Cleaning-up by
- adding border only between namespace and talk options
- adding namespace border on all but the first occurrence

Change-Id: Icfc87757deda9b7655c4ea5c919b5c2f2e2ae09e
2018-10-25 15:06:56 -07:00
jenkins-bot
5726d9be54 Merge "Clear the title cache in MutableRevisionRecordTest" 2018-10-25 21:50:51 +00:00
jenkins-bot
7b03008aea Merge "Make testFormatValueRestrictions() account for $wgArticlePath to avoid failures" 2018-10-25 21:45:32 +00:00
jenkins-bot
839e0d6768 Merge "Move timing code out of the try/catch in doPostOutputShutdown()" 2018-10-25 21:45:27 +00:00
jenkins-bot
28aebf8e06 Merge "Silence transaction profiler master queries notices for rollback" 2018-10-25 21:27:08 +00:00
jenkins-bot
14e0c6af83 Merge "rdbms: remove duplicate @params in IDatabase::select()" 2018-10-25 21:17:19 +00:00
jenkins-bot
07bb67286b Merge "filerepo: Inject the WAN cache info FileRepo instances" 2018-10-25 21:17:09 +00:00
jenkins-bot
e3cfa25e71 Merge "Remove unused fields in ForeignDBViaLBRepo" 2018-10-25 21:17:04 +00:00
jenkins-bot
d31ec23f2a Merge "rdbms: Use "mixed" type for $profiler field in LoadBalancer" 2018-10-25 21:16:59 +00:00
Aaron Schulz
c4d9d51506 Clear the title cache in MutableRevisionRecordTest
Also do so in various other test classes.

Follows-up 170c49d61c. Fixes Travis CI regression:

> 1) MediaWiki\Tests\Revision\MutableRevisionRecordTest::testSetGetPageId
> Failed asserting that 2 is identical to 0.
> tests/phpunit/includes/Revision/MutableRevisionRecordTest.php:129

Change-Id: I41c8bda8e620ebe7608a393d81f3b0f13af68ba7
2018-10-25 21:16:27 +00:00
Aaron Schulz
4108381175 Make testFormatValueRestrictions() account for $wgArticlePath to avoid failures
Follows-up 170c49d61c.

Change-Id: I37a57b5ece939c5743b7d08d02ce41c71daee5eb
2018-10-25 21:14:34 +00:00
Aaron Schulz
8baffeae4f filerepo: Inject the WAN cache info FileRepo instances
Also fixed some intellij IDEA warnings.

Change-Id: I667ed7ef9b49c1da1c8c7c9914daadb7c74b3c79
2018-10-25 20:57:40 +00:00
Aaron Schulz
5ad3a32361 rdbms: Use "mixed" type for $profiler field in LoadBalancer
Change-Id: I8d110d0420a155bb62f4212933d9de2562dc7661
2018-10-25 20:47:28 +00:00
Translation updater bot
d75ac255ad Localisation updates from https://translatewiki.net.
Change-Id: I67923401760c77676ed4e674170335333ac15d15
2018-10-25 22:16:19 +02:00
jenkins-bot
995afd709d Merge "Fix code style in EmailNotification.php" 2018-10-25 19:30:22 +00:00
Alangi Derick
eb251abc62 Fix code style in EmailNotification.php
Code style fix for namespace "use" statement.

Change-Id: I0755481f640aae535c8328824812e25db467e528
2018-10-25 18:57:22 +00:00
jenkins-bot
b00021f0e7 Merge "MailAddress->toString(): Reduce complexity by inverting ifs" 2018-10-25 17:49:09 +00:00
Reedy
da9c742af0 MailAddress->toString(): Reduce complexity by inverting ifs
Change-Id: I5185c0231a0944f36d960211e78cf36273c94d52
2018-10-25 10:30:11 -07:00
Aaron Schulz
0ee8b1652b Move timing code out of the try/catch in doPostOutputShutdown()
Change-Id: Idc24fdaff5bbcb98445cc4dee8c94cc75cd00573
2018-10-25 09:22:30 -07:00
Aaron Schulz
59573879f1 rdbms: avoid transaction status errors from ping() in rollback()
Change-Id: I38658cbf90518d9818824674da371637db15e156
2018-10-25 08:34:39 -07:00
Brad Jorsch
46875ad861 API: Set robots noindex,nofollow on HTML output
There's probably not much benefit in search engines indexing the API
auto-generated help or various random "format=jsonfm" outputs.

On Wikimedia wikis we already have a robots.txt entry denying indexing
of everything under /w/, which includes api.php.

Bug: T207818
Change-Id: I196d401eeb5fcf49844265df41ad3cce83ffdcdf
2018-10-25 09:37:30 -04:00
jenkins-bot
78573c77cb Merge "WikiPage: Truncate redirect fragments before inserting them into the DB" 2018-10-25 04:43:50 +00:00
jenkins-bot
f48deac5a9 Merge "RCFilters: Fix centering of "no results" message" 2018-10-25 03:13:49 +00:00
Roan Kattouw
991d50d409 RCFilters: Fix centering of "no results" message
Was caused by a stray margin-right rule that applied to the wrong divs,
and wasn't needed anyway.

Bug: T207808
Change-Id: Ib6cf518653fbadb0c7d67d6a175b4af92c8f8d87
Follows-Up: I76fec57ff237ba02afefcea28916d8348bac9b0e
2018-10-24 17:51:42 -07:00
Roan Kattouw
13a1d8957b WikiPage: Truncate redirect fragments before inserting them into the DB
The rd_fragment field is 255 bytes wide, but there is no limit on how
long title fragments can be. We don't want to let the database silently
truncate the fragment for us, because that can result in invalid UTF-8.
Instead, truncate it before insertion in a UTF-8-aware way.

Bug: T207876
Change-Id: I12745f3f4c174eaced56d80f3661a71d0e5637e6
2018-10-24 17:33:56 -07:00
jenkins-bot
6926911815 Merge "composer.json, require ext-fileinfo" 2018-10-24 23:35:56 +00:00
Kunal Mehta
d47e2822bc Disable $wgEnableImageWhitelist by default
This opens up a hole for administrators to load images from external resources,
potentially leaking user's private information to external servers (IP address,
User-Agent, etc.).

Change-Id: Ie780637b292493e664e4d54671a5bb81046106f4
2018-10-24 15:39:53 -07:00
jenkins-bot
2ce2935c06 Merge "Use a pre-commit hook for change_tag_def count updates" 2018-10-24 22:14:03 +00:00
jenkins-bot
0d2dd9cf37 Merge "Hard deprecate functionality replaced with random_bytes()" 2018-10-24 22:13:06 +00:00
jenkins-bot
23b8bd2ad0 Merge "Hard deprecate non-tidy OutputPage::addWikiText() method" 2018-10-24 22:13:00 +00:00
jenkins-bot
63a4cf6796 Merge "RELEASE-NOTES-1.33: Note new Partial Blocks feature flag" 2018-10-24 22:09:54 +00:00
jenkins-bot
ecee5cd7c7 Merge "Use PHP 7 '??' operator instead of if-then-else" 2018-10-24 21:58:04 +00:00