lhc/web/wiklou.git
3 years agoFix warning "ob_end_flush(): failed to delete and flush buffer" during uploads
Edward Chernenko [Sun, 1 Apr 2018 21:39:59 +0000 (00:39 +0300)]
Fix warning "ob_end_flush(): failed to delete and flush buffer" during uploads

Bug: T186565
Change-Id: Ia4b29611ccee4acac11717f5220ff9e0fdbd55a9

3 years agoAdd Hebrew alias for special page ApiSandbox
Guycn2 [Sun, 1 Apr 2018 19:26:35 +0000 (19:26 +0000)]
Add Hebrew alias for special page ApiSandbox

Change-Id: I09bf2951b5bc18bf9f7080d178ea74466d14e97e

3 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 1 Apr 2018 06:23:30 +0000 (08:23 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I20bbb93b56df4246c31344f3929742af581c3118

3 years agoMerge "MessagesBs.php: Update namespaces names"
jenkins-bot [Sat, 31 Mar 2018 19:48:27 +0000 (19:48 +0000)]
Merge "MessagesBs.php: Update namespaces names"

3 years agoMerge "rdbms: avoid lag estimates in getLagFromPtHeartbeat ruined by snapshots"
jenkins-bot [Sat, 31 Mar 2018 08:31:10 +0000 (08:31 +0000)]
Merge "rdbms: avoid lag estimates in getLagFromPtHeartbeat ruined by snapshots"

3 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 31 Mar 2018 06:46:05 +0000 (08:46 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Id315b02132af92cc2d4b61a28da34be32e333e54

3 years agordbms: avoid lag estimates in getLagFromPtHeartbeat ruined by snapshots
Aaron Schulz [Thu, 29 Mar 2018 23:30:38 +0000 (16:30 -0700)]
rdbms: avoid lag estimates in getLagFromPtHeartbeat ruined by snapshots

Bug: T190960
Change-Id: I57dd8d3d0ca96d6fb2f9e83f062f29b1d53224dd

3 years agoMerge "rdbms: update IDatabase::getLag comments"
jenkins-bot [Sat, 31 Mar 2018 00:52:09 +0000 (00:52 +0000)]
Merge "rdbms: update IDatabase::getLag comments"

3 years agoMerge "rdbms: add more error logging to DatabaseMysqlBase::masterPosWait"
jenkins-bot [Sat, 31 Mar 2018 00:47:27 +0000 (00:47 +0000)]
Merge "rdbms: add more error logging to DatabaseMysqlBase::masterPosWait"

3 years agoMessagesBs.php: Update namespaces names
zoranzoki21 [Tue, 20 Feb 2018 17:47:45 +0000 (18:47 +0100)]
MessagesBs.php: Update namespaces names

Bug: T172050
Change-Id: I3eb31ef0785138b14342c27a4232bec2b782c0bf

3 years agoMerge "mediawiki.action.view.rightClickEdit: Remove redundanat dom-ready handler"
jenkins-bot [Fri, 30 Mar 2018 15:15:38 +0000 (15:15 +0000)]
Merge "mediawiki.action.view.rightClickEdit: Remove redundanat dom-ready handler"

3 years agordbms: add more error logging to DatabaseMysqlBase::masterPosWait
Aaron Schulz [Fri, 30 Mar 2018 11:39:05 +0000 (04:39 -0700)]
rdbms: add more error logging to DatabaseMysqlBase::masterPosWait

Change-Id: Ia687ddeffc9c9427c6126d8ed831fb52b38e8260

3 years agoMerge "Improve docs for revision, archive, and slots schemas in tables.sql"
jenkins-bot [Fri, 30 Mar 2018 11:27:11 +0000 (11:27 +0000)]
Merge "Improve docs for revision, archive, and slots schemas in tables.sql"

3 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 30 Mar 2018 06:54:37 +0000 (08:54 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I0c57d6f3f632ddd06f36f833c53f97d96e7dd645

3 years agordbms: update IDatabase::getLag comments
Aaron Schulz [Thu, 29 Mar 2018 23:14:37 +0000 (16:14 -0700)]
rdbms: update IDatabase::getLag comments

Also add missing __METHOD__ to getLagFromPtHeartbeat()

Change-Id: I4257b1d47a88779b47d807a881561c331ff3aa30

3 years agoMerge "rdbms: remove some dead code from Database::begin"
jenkins-bot [Thu, 29 Mar 2018 23:02:39 +0000 (23:02 +0000)]
Merge "rdbms: remove some dead code from Database::begin"

3 years agordbms: remove some dead code from Database::begin
Aaron Schulz [Thu, 29 Mar 2018 21:51:47 +0000 (14:51 -0700)]
rdbms: remove some dead code from Database::begin

The "since" filed is computed after getLag(), so this was useless

Change-Id: I252602e85709b1cfc191d4783bd1c53d5b3e8fe8

3 years agoMerge "Improve docs for archive schema in tables.sql"
jenkins-bot [Thu, 29 Mar 2018 22:26:29 +0000 (22:26 +0000)]
Merge "Improve docs for archive schema in tables.sql"

3 years agoImprove docs for revision, archive, and slots schemas in tables.sql
Brad Jorsch [Thu, 29 Mar 2018 22:14:12 +0000 (18:14 -0400)]
Improve docs for revision, archive, and slots schemas in tables.sql

Follows up Id2257827.

Change-Id: Ifd61eaa51a6f7781522cecdbf8c563465e97e885

3 years agomediawiki.action.view.rightClickEdit: Remove redundanat dom-ready handler
Timo Tijhof [Thu, 29 Mar 2018 21:33:25 +0000 (14:33 -0700)]
mediawiki.action.view.rightClickEdit: Remove redundanat dom-ready handler

This file was wrapped in a jQuery() dom-ready callback, but it doesn't
and shouldn't have that because it needlessly delays execution.

I probably added because back then, using the first parameter of jQuery()
was a common way for aliasing it to '$', but we use closures for that
nowadays.

Change-Id: I65768564ed556828fd193dfe99d11370fa745112

3 years agoMerge "Allow schema overrides to drop tables."
jenkins-bot [Thu, 29 Mar 2018 20:07:43 +0000 (20:07 +0000)]
Merge "Allow schema overrides to drop tables."

3 years agoAllow schema overrides to drop tables.
daniel [Wed, 28 Mar 2018 20:02:42 +0000 (22:02 +0200)]
Allow schema overrides to drop tables.

This allows unit tests to use schema overrides that drop tables,
in addition to overrides that create or modify tables.

Change-Id: I59761c7db7f83698749324ca6b9ffced86ab1249

3 years agoMerge "Bump avro to 1.8"
jenkins-bot [Thu, 29 Mar 2018 19:30:06 +0000 (19:30 +0000)]
Merge "Bump avro to 1.8"

3 years agoMerge "Fix MockMessageLocalizer"
jenkins-bot [Thu, 29 Mar 2018 18:46:41 +0000 (18:46 +0000)]
Merge "Fix MockMessageLocalizer"

3 years agoRCFilters UI: Remove CSS customization for help icon
Roan Kattouw [Thu, 29 Mar 2018 15:57:08 +0000 (17:57 +0200)]
RCFilters UI: Remove CSS customization for help icon

This fixes most of the misalignment after the OOUI v0.26 upgrade.

Bug: T191014
Change-Id: I4623836d134fa52fb6b562e671a5da104b787b7d

3 years agoMerge "Add protection for User: JSON pages in the same manner as JS & CSS ones"
jenkins-bot [Thu, 29 Mar 2018 14:49:25 +0000 (14:49 +0000)]
Merge "Add protection for User: JSON pages in the same manner as JS & CSS ones"

3 years agoAdd protection for User: JSON pages in the same manner as JS & CSS ones
James D. Forrester [Tue, 13 Feb 2018 00:20:05 +0000 (16:20 -0800)]
Add protection for User: JSON pages in the same manner as JS & CSS ones

Also recognise MediaWiki: JSON pages (with the existing protection of
the editinterface right).

Bug: T76554
Change-Id: Idba166d82ee6dd507d7345c9bdbefc8ca78ed7b4

3 years agoFix MockMessageLocalizer
Lucas Werkmeister [Thu, 29 Mar 2018 10:32:00 +0000 (12:32 +0200)]
Fix MockMessageLocalizer

Add it to the autoloader for the tests, and remove the unneeded use
statements which cause test failures.

Change-Id: I7092525eae440c6969fc84e8979572957733cf03

3 years agoMerge "Make SpecialWhatLinkshere::showIndirectLinks use buildSelectSubquery()"
jenkins-bot [Thu, 29 Mar 2018 04:07:42 +0000 (04:07 +0000)]
Merge "Make SpecialWhatLinkshere::showIndirectLinks use buildSelectSubquery()"

3 years agoImprove docs for archive schema in tables.sql
Timo Tijhof [Tue, 27 Mar 2018 01:18:19 +0000 (18:18 -0700)]
Improve docs for archive schema in tables.sql

Also fix typo in migrateArchiveText.php from 295b055ea33d.

Change-Id: Id225782783007c4674c5b25860172c07273d1045

3 years agoBump avro to 1.8
Max Semenik [Thu, 29 Mar 2018 00:58:33 +0000 (17:58 -0700)]
Bump avro to 1.8

Adss PHP7 support.

Bug: T177273
Change-Id: I38cf66d6602170cec3a307bfe44656db103c321f

3 years agoRCFilters: Rename deprecated 'unClip' icon to 'bookmark'
Volker E [Wed, 28 Mar 2018 22:50:04 +0000 (15:50 -0700)]
RCFilters: Rename deprecated 'unClip' icon to 'bookmark'

'unClip' got deprecated in OOUI v0.26.1 and 'bookmark' is the new,
more appropriate name.

Bug: T183601
Change-Id: I797071327987a8032b9d7d1d9bcfa27f4fd9db2f

3 years agoMerge "Normalize and lower the default DB lag wait timeout"
jenkins-bot [Wed, 28 Mar 2018 21:48:52 +0000 (21:48 +0000)]
Merge "Normalize and lower the default DB lag wait timeout"

3 years agoMake SpecialWhatLinkshere::showIndirectLinks use buildSelectSubquery()
Aaron Schulz [Wed, 28 Mar 2018 21:36:18 +0000 (14:36 -0700)]
Make SpecialWhatLinkshere::showIndirectLinks use buildSelectSubquery()

This avoids the SPI log warning from d395dfb039

Change-Id: I193418a224a8c6c0cc919e29c66686947d5969bf

3 years agoNormalize and lower the default DB lag wait timeout
Aaron Schulz [Wed, 28 Mar 2018 20:49:21 +0000 (13:49 -0700)]
Normalize and lower the default DB lag wait timeout

Bug: T190960
Change-Id: I49aca118583b20314e6bf82f196f3413571f5bd9

3 years agoRawAction: Remove unused $gen variable
Timo Tijhof [Wed, 28 Mar 2018 20:18:14 +0000 (13:18 -0700)]
RawAction: Remove unused $gen variable

Follows-up 697c423259 (MW 1.27), which removed use of these variables.
The '$this->gen' member is never used, and neither is local $gen.

Change-Id: I663d343d0255d5e13d7d87b1d4e565a7df667449

3 years agoMerge "BaseTemplate: Remove code for unused 'ispermalink' toolbox item"
jenkins-bot [Wed, 28 Mar 2018 19:25:40 +0000 (19:25 +0000)]
Merge "BaseTemplate: Remove code for unused 'ispermalink' toolbox item"

3 years agoMerge "Add MockMessageLocalizer"
jenkins-bot [Wed, 28 Mar 2018 17:25:54 +0000 (17:25 +0000)]
Merge "Add MockMessageLocalizer"

3 years agoMerge "resourceloader: Replace ClientHtml 'target' param with 'options' array"
jenkins-bot [Wed, 28 Mar 2018 16:27:39 +0000 (16:27 +0000)]
Merge "resourceloader: Replace ClientHtml 'target' param with 'options' array"

3 years agoMerge "resourceloader: Add test for ClientHtml passing down 'target'"
jenkins-bot [Wed, 28 Mar 2018 16:26:02 +0000 (16:26 +0000)]
Merge "resourceloader: Add test for ClientHtml passing down 'target'"

3 years agoMerge "Get ~100% test coverage for ApiEditPage.php and fix a couple of bugs"
jenkins-bot [Wed, 28 Mar 2018 15:41:54 +0000 (15:41 +0000)]
Merge "Get ~100% test coverage for ApiEditPage.php and fix a couple of bugs"

3 years agoMerge "Selenium: install bluebird, mwbot dependency"
jenkins-bot [Wed, 28 Mar 2018 13:51:10 +0000 (13:51 +0000)]
Merge "Selenium: install bluebird, mwbot dependency"

3 years agoMerge "Let built-in web server handle .php requests"
jenkins-bot [Wed, 28 Mar 2018 13:43:48 +0000 (13:43 +0000)]
Merge "Let built-in web server handle .php requests"

3 years agoLet built-in web server handle .php requests
Antoine Musso [Fri, 23 Mar 2018 10:38:26 +0000 (11:38 +0100)]
Let built-in web server handle .php requests

When using the PHP built-in webserver with maintenance/dev/start.sh,
requests made to regular files do show in the console output but
requests to .php files do not log anything in the console. It is a bit
annoying since one is left wondering whether the requests are actually
honored.

The reason is the request router maintenance/dev/includes/router.php
does a require of the PHP file and abort the router (return true). That
causes the built-in php server to not produce the access log requests.

Based on the comment note, some earlier PHP version had POST data
stripped preventing login. The related upstream bug is
https://bugs.php.net/bug.php?id=60159:

  "Router returns false, but POST is not passed to requested resource"

750eac7e41d introduced the workaround on Nov 24th 2011. PHP 5.4.0 got
released in March 2012 and refers to that bug.  The development of our
router thus must have used a development/beta version of PHP 5.4.

Since the fix made it to the PHP final release, there is no need for
workaround anymore.

Bug: T190503
Change-Id: Ia8c4f1610ea0ef5b04ea30d6e91199b8e597065b

3 years agoGet ~100% test coverage for ApiEditPage.php and fix a couple of bugs
Aryeh Gregor [Tue, 20 Mar 2018 13:25:26 +0000 (15:25 +0200)]
Get ~100% test coverage for ApiEditPage.php and fix a couple of bugs

Bugs fixed:

* The major one was that appendtext and prependtext seemingly didn't
  work at all on empty pages in the MediaWiki namespace, because
  $this->getTitle() was being used in place of $titleObj.
* Negative undo/undoafter were not rejected in a correct fashion.
* If a logged-in user who was not allowed to upload images tried to
  create an image redirect, the error message used a nonexistent key.

I also replaced assertEquals with assertSame.

I also removed a bit of clearly dead code.  This includes a "break"
following dieStatus().  If we actually want this break so that nobody
adds a case after the default and then removes the dieStatus() so the
switch incorrectly falls through, it could be re-added with
@codeCoverageIgnore.

I put the fixes in the same commit as the test changes because I like to
keep fixes together with the tests for those fixes.

All code now shows up as covered locally, except for one line that seems
to be a PHPUnit bug.

Change-Id: I9375bc5f40268fd681a2d447c66a03f40b23390a

3 years agoMerge "RCFilters: Bidi isolate tag names and descriptions"
jenkins-bot [Wed, 28 Mar 2018 12:30:07 +0000 (12:30 +0000)]
Merge "RCFilters: Bidi isolate tag names and descriptions"

3 years agoSelenium: install bluebird, mwbot dependency
Željko Filipin [Wed, 28 Mar 2018 11:15:57 +0000 (13:15 +0200)]
Selenium: install bluebird, mwbot dependency

Bluebird is implicitly installed on my machine, probably because I have a recent npm version. It needs to be explicitly installed in MediaWiki-Vagrant, probably because of an older npm version.

Bug: T190914
Change-Id: I9c704502fb5e20abf9b21d483723eb55b6fb3875

3 years agoAdd MockMessageLocalizer
Lucas Werkmeister [Wed, 28 Mar 2018 11:00:27 +0000 (13:00 +0200)]
Add MockMessageLocalizer

This MessageLocalizer may be used in tests. By default, it sets the
language for all messages to 'qqx', to make the tests independent of the
$wgLanguageCode of the wiki the tests are running in.

Change-Id: I7412ec49b6c0fab8146e09bb8aa599b35d88fc97

3 years agoresourceloader: Replace ClientHtml 'target' param with 'options' array
Timo Tijhof [Tue, 27 Mar 2018 21:28:03 +0000 (14:28 -0700)]
resourceloader: Replace ClientHtml 'target' param with 'options' array

In preparation for passing down 'safemode' from OutputPage.

Only used in one place in Wikimedia Git: OutputPage::getRlClient().

Bug: T185303
Change-Id: If01eca96986ff8d7dcdaab6910bf183ba7c7311f

3 years agoMerge "This patch reduces the edit summary length to 500 characters"
jenkins-bot [Tue, 27 Mar 2018 22:38:24 +0000 (22:38 +0000)]
Merge "This patch reduces the edit summary length to 500 characters"

3 years agoresourceloader: Add test for ClientHtml passing down 'target'
Timo Tijhof [Tue, 27 Mar 2018 21:23:38 +0000 (14:23 -0700)]
resourceloader: Add test for ClientHtml passing down 'target'

This was not previously tested.

Change-Id: I25d9ec28b712b0b699f1369b284faf337b8af5aa

3 years agoRevert "Localisation updates from https://translatewiki.net."
Raimond Spekking [Tue, 27 Mar 2018 19:56:36 +0000 (19:56 +0000)]
Revert "Localisation updates from https://translatewiki.net."

Overwrites new messages

This reverts commit a7c30ad5d91dee12958c2a29ff6ffdc06a65d6e3.

Change-Id: I40b6aae837f2d4c06e860d47a8255d6f7ab2cf59

3 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 27 Mar 2018 19:54:05 +0000 (21:54 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Idf22ae14a5fb2d2a0e5615720e047c63f32cdfff

3 years agoBaseTemplate: Remove code for unused 'ispermalink' toolbox item
Bartosz Dziewoński [Tue, 27 Mar 2018 19:43:28 +0000 (21:43 +0200)]
BaseTemplate: Remove code for unused 'ispermalink' toolbox item

This code path is never used.

When introduced in 2005 (bf0d92d5 / rSVN10709), the "Permanent link"
item in the MonoBook sidebar was a link to an oldid only when viewing
the latest version of an article (using the ID 't-permalink'), and
otherwise it was a greyed out link to nowhere to indicate you're
already viewing a permanent link (using the ID 't-ispermalink').

Later, in 2007, when the behavior of "Cite this page" item (now part
of the CiteThisPage extension) was corrected for old revisions
(1a60bd4c / rSVN21819), the "greying out" of the permalink was removed
to be consistent with the new item. Only half of the feature was
removed though: permalink was no longer a link to nowhere, but the
code in MonoBook to make permalinks that are links to nowhere greyed
out (by using different ID) stayed.

This code was then dutifully preserved when BaseTemplate, MonoBook was
rewritten, and then through several refactorings.

I think we can safely remove it. Leftover styles in MonoBook are being
removed in I58aca1f4255df14d6289e167e180dad31b546a8c.

Change-Id: I2fb3d7e0ecb3bbbd0c09774e2d86f86502a48bf1

3 years agoMerge "Revert "Pass revision being reverted to edit code""
jenkins-bot [Tue, 27 Mar 2018 14:23:20 +0000 (14:23 +0000)]
Merge "Revert "Pass revision being reverted to edit code""

3 years agoMerge "mediawiki.user: Implement mw.user.stickyRandomId"
jenkins-bot [Tue, 27 Mar 2018 14:15:47 +0000 (14:15 +0000)]
Merge "mediawiki.user: Implement mw.user.stickyRandomId"

3 years agoMerge "Make WikiPage::doViewUpdates use a PRESEND deferred update"
jenkins-bot [Tue, 27 Mar 2018 00:25:42 +0000 (00:25 +0000)]
Merge "Make WikiPage::doViewUpdates use a PRESEND deferred update"

3 years agoMerge "Overhaul site_stats table"
jenkins-bot [Tue, 27 Mar 2018 00:02:58 +0000 (00:02 +0000)]
Merge "Overhaul site_stats table"

3 years agoOverhaul site_stats table
Eddie Greiner-Petter [Mon, 8 May 2017 19:31:54 +0000 (21:31 +0200)]
Overhaul site_stats table

The site stats table holds a bunch of metric fields, two of which are of
data type "bigint unsigned", 3 are "bigint" (signed) and one is int
(signed).  Also the default values differ widely: It is 0 on the
"unsigned" fields and the "int" field, but -1 on the three others. This
patch makes all of this more consistent:

Set all fields (except the ss_row_id, which isn't changed) data type to
"bigint unsigned". Also set NULL as the default value for all those
fields. Obviously -1 isn't a possible default value any more. Also, 0
can easily be mistaken for a real value (e.g. ss_active_users=0 -->
"there is nobody active on this wiki"). NULL, by it's definition, is the
value of choice for a value to insert into fields of which we don't know
a correct value.

The respective patch files were tested locally against MySql, Sqlite,
Postgres and SQL Server 2016. Neither oracle nor the upgrade with
update.php was tested.

Bug: T56888
Change-Id: I7d42aae434852a56b6f8dd559d8a5f3bce416021

3 years agoSync up with Parsoid parserTests.txt
Subramanya Sastry [Mon, 26 Mar 2018 23:42:20 +0000 (16:42 -0700)]
Sync up with Parsoid parserTests.txt

This now aligns with Parsoid commit ad7c4322d4dd7903065f066d8d96ead875b5126b

Change-Id: Ica20c20ce8f40786f9b2b8ec4c3021f49843354f

3 years agoMerge "Fix whitespace trimming in headings"
jenkins-bot [Mon, 26 Mar 2018 23:12:31 +0000 (23:12 +0000)]
Merge "Fix whitespace trimming in headings"

3 years agoMerge "tests: Remove some unused stuff in phpunit tests"
jenkins-bot [Mon, 26 Mar 2018 22:59:06 +0000 (22:59 +0000)]
Merge "tests: Remove some unused stuff in phpunit tests"

3 years agotests: Remove some unused stuff in phpunit tests
Max Semenik [Sat, 17 Mar 2018 07:49:07 +0000 (00:49 -0700)]
tests: Remove some unused stuff in phpunit tests

Change-Id: Ica20e4f4ac0887b7cac12700ffcd15f587b3ba01

3 years agoMerge "Cleanup ProfilerOutputDb try/catch logic for DBErrors"
jenkins-bot [Mon, 26 Mar 2018 22:45:28 +0000 (22:45 +0000)]
Merge "Cleanup ProfilerOutputDb try/catch logic for DBErrors"

3 years agoMerge "mediawiki.api.upload: Fix test assumption about <iframe>"
jenkins-bot [Mon, 26 Mar 2018 22:40:46 +0000 (22:40 +0000)]
Merge "mediawiki.api.upload: Fix test assumption about <iframe>"

3 years agoRevert "Pass revision being reverted to edit code"
MaxSem [Mon, 26 Mar 2018 22:28:46 +0000 (22:28 +0000)]
Revert "Pass revision being reverted to edit code"

Too many regressions, doing it the different way.

This reverts commit b7737ebed1e8940df4dfd4c50c1224d0edc8639d.

Bug: T190374
Change-Id: I12cb7470aeb7852ddea319c7e499ca3a7b45c84c

3 years agoMerge "rdbms: ignore DBO_IGNORE if passed into Database::__construct()"
jenkins-bot [Mon, 26 Mar 2018 21:51:52 +0000 (21:51 +0000)]
Merge "rdbms: ignore DBO_IGNORE if passed into Database::__construct()"

3 years agoMerge "rdbms: add "use" statement for UnexpectedValueExcetion in Database"
jenkins-bot [Mon, 26 Mar 2018 21:51:50 +0000 (21:51 +0000)]
Merge "rdbms: add "use" statement for UnexpectedValueExcetion in Database"

3 years agoMerge "Create save/publish buttons labels with ellipses"
jenkins-bot [Mon, 26 Mar 2018 21:05:35 +0000 (21:05 +0000)]
Merge "Create save/publish buttons labels with ellipses"

3 years agoMerge "Bump required Postgres version to 9.2"
jenkins-bot [Mon, 26 Mar 2018 20:20:48 +0000 (20:20 +0000)]
Merge "Bump required Postgres version to 9.2"

3 years agoBump required Postgres version to 9.2
Max Semenik [Mon, 26 Mar 2018 18:47:02 +0000 (11:47 -0700)]
Bump required Postgres version to 9.2

This was approved by TechCom in the "PostgreSQL schema change for
consistency with MySQL" RfC (T164898).

Bug: T164898
Bug: T190539
Change-Id: I1b17c18c513e4edcd9219e36e873c55dd7f33034

3 years agoRCFilters: Bidi isolate tag names and descriptions
Moriel Schottlender [Mon, 26 Mar 2018 20:00:25 +0000 (23:00 +0300)]
RCFilters: Bidi isolate tag names and descriptions

Tags can be untranslated in wikis; most often remain in English
even in an RTL wiki. Since that text is inserted by external
input that can be outside normal translation, we should expect
any directional string in there, and these should be bidi isolated.

Bug: T190718
Change-Id: Iebc3176c5d0f5097badd0dde565a5a6cbfa3a3c2

3 years agoMerge "RCFilters: Hide 'reload watchlist automatically' setting if RCFilters is enabled"
jenkins-bot [Mon, 26 Mar 2018 19:59:46 +0000 (19:59 +0000)]
Merge "RCFilters: Hide 'reload watchlist automatically' setting if RCFilters is enabled"

3 years agoMake WikiPage::doViewUpdates use a PRESEND deferred update
Aaron Schulz [Mon, 26 Mar 2018 04:04:11 +0000 (21:04 -0700)]
Make WikiPage::doViewUpdates use a PRESEND deferred update

This is better than a dubious try/catch which had the off chance
of letting partial implicit transactions be committed.

Change-Id: Ied4870df166dc5a8224866284ea6e1958e65f499

3 years agoMerge "Added heartbeat for pingback."
jenkins-bot [Mon, 26 Mar 2018 18:21:13 +0000 (18:21 +0000)]
Merge "Added heartbeat for pingback."

3 years agoDrop the ProfileSection class, deprecated in 1.25 and unused
James D. Forrester [Tue, 6 Mar 2018 17:16:31 +0000 (17:16 +0000)]
Drop the ProfileSection class, deprecated in 1.25 and unused

Change-Id: I3979f193562bce8252fc8778baaf78bd0d2c1a40

3 years agoDrop HTMLForm & VFormHTMLForm::isVForm(), deprecated in 1.25
James D. Forrester [Tue, 6 Mar 2018 17:11:47 +0000 (17:11 +0000)]
Drop HTMLForm & VFormHTMLForm::isVForm(), deprecated in 1.25

Change-Id: If5f4e146071c17a9adabd36453ef68ff38405ed4

3 years agoDrop Title::getTitleInvalidRegex(), deprecated in 1.25
James D. Forrester [Tue, 6 Mar 2018 17:09:41 +0000 (17:09 +0000)]
Drop Title::getTitleInvalidRegex(), deprecated in 1.25

Change-Id: I8b8dd744c4c2ca5a13c89701b44013ddda785f3b

3 years agoMerge "Drop SpecialPageFactory::getList(), deprecated in 1.24"
jenkins-bot [Mon, 26 Mar 2018 17:54:21 +0000 (17:54 +0000)]
Merge "Drop SpecialPageFactory::getList(), deprecated in 1.24"

3 years agoMerge "resourceloader: Use getRawVal instead of slower getVal in StartupModule"
jenkins-bot [Mon, 26 Mar 2018 17:39:18 +0000 (17:39 +0000)]
Merge "resourceloader: Use getRawVal instead of slower getVal in StartupModule"

3 years agoMerge "Remove deprecated functions from ChangeTags class"
jenkins-bot [Mon, 26 Mar 2018 17:35:04 +0000 (17:35 +0000)]
Merge "Remove deprecated functions from ChangeTags class"

3 years agoMerge "Stop test from randomly failing"
jenkins-bot [Mon, 26 Mar 2018 17:25:13 +0000 (17:25 +0000)]
Merge "Stop test from randomly failing"

3 years agoRemove deprecated functions from ChangeTags class
Jayprakash12345 [Sat, 10 Mar 2018 04:02:03 +0000 (04:02 +0000)]
Remove deprecated functions from ChangeTags class

* listExtensionActivatedTags
* listExtensionDefinedTags

These were deprecated in MediaWiki 1.28, and have no uses in Wikimedia Git.

Change-Id: I88bdfc3ea3d9ba9845f7caac2430f815f1a9b5b0

3 years agoMerge "ParserTest: clear Language namespaces cache"
jenkins-bot [Mon, 26 Mar 2018 17:21:48 +0000 (17:21 +0000)]
Merge "ParserTest: clear Language namespaces cache"

3 years agoMerge "PostgresUpdater: Rename custom "dropIndex" to "dropPgIndex""
jenkins-bot [Mon, 26 Mar 2018 17:16:55 +0000 (17:16 +0000)]
Merge "PostgresUpdater: Rename custom "dropIndex" to "dropPgIndex""

3 years agoStop test from randomly failing
Aryeh Gregor [Mon, 26 Mar 2018 17:08:22 +0000 (20:08 +0300)]
Stop test from randomly failing

The difference between two integers is less than 1 only if it's 0, so
the test as-is will fail whenever the second changes between when '1
day' is evaluated when inserting the block, and when time() is called
for the assert.

Change-Id: Ic76ff05729129b74345696879a934253525213fa

3 years agomediawiki.user: Implement mw.user.stickyRandomId
Gilles Dubuc [Thu, 22 Mar 2018 13:06:56 +0000 (14:06 +0100)]
mediawiki.user: Implement mw.user.stickyRandomId

This is a sticky version of generateRandomSessionId,
useful to keep track of the pageview between extensions.

Bug: T187299
Change-Id: I0877c399c60d3fb2fdf8e844cad6acecf6f704c9

3 years agoMerge "Improve test coverage for ApiBlock.php to 100%"
jenkins-bot [Mon, 26 Mar 2018 16:42:04 +0000 (16:42 +0000)]
Merge "Improve test coverage for ApiBlock.php to 100%"

3 years agoPostgresUpdater: Rename custom "dropIndex" to "dropPgIndex"
Brad Jorsch [Mon, 26 Mar 2018 16:14:50 +0000 (12:14 -0400)]
PostgresUpdater: Rename custom "dropIndex" to "dropPgIndex"

There doesn't seem to be any reason this shouldn't follow the naming
conventions of other PG-specific schema change functions, and Ie9dbda329
shows that difference can be confusing.

Change-Id: Ie3e0d5b130486aa9ab5eebd879dca846dfa99584

3 years agoAdded heartbeat for pingback.
Cindy Cicalese [Wed, 14 Mar 2018 07:31:17 +0000 (07:31 +0000)]
Added heartbeat for pingback.

The current implementation of the pingback feature sends new data on
the first page load after running the update.php maintenance script if
no ping has yet been sent for the wiki's current MediaWiki version.
There is no way by observing the event log to determine if a given wiki
is still operational, since no further pings are sent unless the
MediaWiki version on the wiki changes. Wikis that are created for
testing purposes or that have been decommissioned will continue to live
on in the pingback data.

This patch adds a monthly heartbeat ping. The structure of the heartbeat
ping is identical to the original ping. The heartbeat ping serves not
only to indicate that the wiki is still alive; it will send updated
information, so it will be possible to find out if any of the data, such
as the PHP version or memory limit, has changed since the last ping even
if the MediaWiki version has stayed the same.

Bug: T189785
Change-Id: Ia3077ed02e36eb6ad6ef0ae4d085ecaeb1547a52

3 years agoRCFilters: Hide 'reload watchlist automatically' setting if RCFilters is enabled
Moriel Schottlender [Mon, 26 Mar 2018 08:04:40 +0000 (11:04 +0300)]
RCFilters: Hide 'reload watchlist automatically' setting if RCFilters is enabled

Bug: T186277
Change-Id: I78a2bae5f8d0e6f947276c69fa1806eeaad46197

3 years agoMerge "Improve test coverage for ApiDelete.php"
jenkins-bot [Mon, 26 Mar 2018 15:18:31 +0000 (15:18 +0000)]
Merge "Improve test coverage for ApiDelete.php"

3 years agoImprove test coverage for ApiBlock.php to 100%
Aryeh Gregor [Sun, 18 Mar 2018 18:48:51 +0000 (20:48 +0200)]
Improve test coverage for ApiBlock.php to 100%

The code coverage tool still reports that line 50 ("$status,") is not
covered, but this is just a parameter to a function that is in fact
called and does show up as covered, so I'm pretty sure it's a bug.

I replaced a couple of sanity checks that reported "incomplete" on
failure with actual assertions so that the test would fail properly if
the sanity check failed.

The testing could still probably be expanded considerably.

Change-Id: Ib6ba7227af23bcb50c7e3bafb0b51395e8acf03f

3 years agoImprove test coverage for ApiDelete.php
Aryeh Gregor [Sun, 18 Mar 2018 19:58:02 +0000 (21:58 +0200)]
Improve test coverage for ApiDelete.php

Still missing a test for file deletion, because I didn't figure out a
simple way to create a file page that I can test on.

Change-Id: I276e84b4f7777e5dd5be5520e572b9b9bb0c0633

3 years agoCleanup ProfilerOutputDb try/catch logic for DBErrors
Aaron Schulz [Mon, 26 Mar 2018 04:00:15 +0000 (21:00 -0700)]
Cleanup ProfilerOutputDb try/catch logic for DBErrors

Also make it avoid transactions for non-sqlite when DBO_TRX is set.
This was the intention before, but nothing made sure that flag was
not active when the upsert()s ran.

Change-Id: I9cb21b199aae4134d172352e66cf8d2841327f85

3 years agoParserTest: clear Language namespaces cache
Antoine Musso [Sun, 25 Mar 2018 13:34:05 +0000 (15:34 +0200)]
ParserTest: clear Language namespaces cache

The content language object has a cache for namespaces, it might then
not take in account $wgExtraNamespaces set by the parser test suite
which causes unknown namespaces errors.

Ensure the new language object has a clean cache.

Repro:
php phpunit.php --filter '(ParserMethodsTest::testValidCovers|T53680)'

Bug: T190554
Change-Id: I9c4104d7bb3a0c84b60d7e7b4154743cbe58348c

3 years agoMerge "Localisation updates from https://translatewiki.net."
L10n-bot [Sat, 24 Mar 2018 21:50:04 +0000 (21:50 +0000)]
Merge "Localisation updates from https://translatewiki.net."

3 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 24 Mar 2018 20:58:12 +0000 (21:58 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ia630a3bdf2b4cffe2cf30f9c1342e39f03ecc8f2

3 years agoMerge "Fix typo in word visibility"
jenkins-bot [Sat, 24 Mar 2018 19:11:32 +0000 (19:11 +0000)]
Merge "Fix typo in word visibility"

3 years agoModify {{#language:ku}}: Kurdî should be written lower-case instead
Ghybu [Wed, 21 Mar 2018 22:22:09 +0000 (22:22 +0000)]
Modify {{#language:ku}}: Kurdî should be written lower-case instead

Bug: T190205
Change-Id: Ieacc885a99d825403c65a2caa36f9011125ad9ce