lhc/web/wiklou.git
7 years agomediawiki.api.watch: Use formatversion=2 for API requests
Fomafix [Mon, 25 Jan 2016 16:31:48 +0000 (16:31 +0000)]
mediawiki.api.watch: Use formatversion=2 for API requests

With formatversion=2 the JSON response uses UTF-8 instead of escape sequences
with hex for encoding of non-ASCII characters (e.g. "\u00e4" for "ä").

formatversion=2 has a different syntax for boolean values:
  formatversion=1: "watched": ""
  formatversion=2: "watched": true

Consumers of this API that process the response with
  response.watched === ''
must change this to
  response.watched === true

Change-Id: I087ab538b9400d774f8c2c6a8c0f55a33fab6044

7 years agoMerge "SpecialActiveUsers: Change checkboxes to dropdown"
jenkins-bot [Wed, 2 Nov 2016 16:50:28 +0000 (16:50 +0000)]
Merge "SpecialActiveUsers: Change checkboxes to dropdown"

7 years agoSpecialActiveUsers: Change checkboxes to dropdown
Sethakill [Wed, 11 May 2016 13:42:12 +0000 (15:42 +0200)]
SpecialActiveUsers: Change checkboxes to dropdown

Moved form to new function and
fixed text about cached version.

Bug: T116354
Change-Id: I29ae63472536f99f7f9546f30d86e7bd324d3094

7 years agoRevert "EditPage: Show EditFilterMergedContent hook errors in an errorbox"
Paladox [Sat, 29 Oct 2016 21:51:27 +0000 (21:51 +0000)]
Revert "EditPage: Show EditFilterMergedContent hook errors in an errorbox"

This reverts commit a02a7ff8eab9d589d77c03d4b4c58fc4a05e65c8.

Bug: T149473
Change-Id: I35a650c6ec478542351824e8ae8a8d8354ffa50f

7 years agoMerge "Revert "Gallery: Use intrinsic width for gallery to center caption""
jenkins-bot [Wed, 2 Nov 2016 12:04:50 +0000 (12:04 +0000)]
Merge "Revert "Gallery: Use intrinsic width for gallery to center caption""

7 years agoRevert "Gallery: Use intrinsic width for gallery to center caption"
Bartosz Dziewoński [Wed, 2 Nov 2016 11:52:24 +0000 (11:52 +0000)]
Revert "Gallery: Use intrinsic width for gallery to center caption"

Resulted in unforeseen changes to galleries using mode=packed
(and other modes other than traditional).

This reverts commit e6dd624baeca16efe462e3938969a72c9ef4ed1e.

Bug: T149412
Change-Id: I57dabbd3b5c0e52f3fad1b2144764bcc2fdecda0

7 years agoMerge "Check MW version requires before manifest_version"
jenkins-bot [Wed, 2 Nov 2016 10:22:08 +0000 (10:22 +0000)]
Merge "Check MW version requires before manifest_version"

7 years agoMerge "Add PHP DateInputWidget"
jenkins-bot [Wed, 2 Nov 2016 10:09:51 +0000 (10:09 +0000)]
Merge "Add PHP DateInputWidget"

7 years agomediawiki.util: Fix replacement of $ signs in mw.util.getUrl
This, that and the other [Wed, 2 Nov 2016 03:31:08 +0000 (14:31 +1100)]
mediawiki.util: Fix replacement of $ signs in mw.util.getUrl

Bug: T149767
Change-Id: I91c1afa1f93966d1f01793d124fe8f2ae3dab0cf

7 years agoWatchedItemStore: Update process cache when adding items
Timo Tijhof [Wed, 2 Nov 2016 00:00:07 +0000 (00:00 +0000)]
WatchedItemStore: Update process cache when adding items

This way, when submitting POST to action=watch, the response will
not show "Unwatched" in the navigation 'content action' tabs.

This was previously the case on any wiki installation that has
more than 1 database as the skin would call User::isWatched(),
which would query stale data from a slave.

This doesn't yet account for the reverse use case (removing from
watchlist). That's to be addressed in a later commit.

Bug: T28292
Change-Id: Ie4b69c985815a77b70692db0c4dbf52e1a6a018d

7 years agoCheck MW version requires before manifest_version
Reedy [Tue, 1 Nov 2016 23:03:13 +0000 (23:03 +0000)]
Check MW version requires before manifest_version

Bug: T149751
Change-Id: I914be4da431dcd613bdf2d1fd5ba9f28cf5b936b

7 years agoAdd PHP DateInputWidget
Geoffrey Mon [Tue, 18 Oct 2016 15:58:06 +0000 (11:58 -0400)]
Add PHP DateInputWidget

Bug: T120733
Change-Id: I8f80e27304a916bba16ed255c8e78073f9da3813

7 years agoMerge "Don't parse <nowiki><span class="error"></nowiki>"
jenkins-bot [Tue, 1 Nov 2016 21:27:36 +0000 (21:27 +0000)]
Merge "Don't parse <nowiki><span class="error"></nowiki>"

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 1 Nov 2016 21:03:38 +0000 (22:03 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I21d3b38d7ec6af6e2a8e6baa6092a6810eab1820

7 years agoMerge "DBError expects IDatabase|null as its first argument"
jenkins-bot [Tue, 1 Nov 2016 19:22:27 +0000 (19:22 +0000)]
Merge "DBError expects IDatabase|null as its first argument"

7 years agoMerge "Parser test file editor"
jenkins-bot [Tue, 1 Nov 2016 16:43:23 +0000 (16:43 +0000)]
Merge "Parser test file editor"

7 years agoDBError expects IDatabase|null as its first argument
Stephane Bisson [Tue, 1 Nov 2016 14:51:13 +0000 (10:51 -0400)]
DBError expects IDatabase|null as its first argument

I came across LBFactory.php:357 while testing my
master/replica db setup. It was not configured correctly
and I got "Argument 1 passed to DBExpectedError::__construct()
must implement interface IDatabase, string given" instead
of the actual error.

Change-Id: I949e1803f84459f8bb83e957a88d1e927cad16f7

7 years agoMerge "Document diff/DifferenceEngine.php function"
jenkins-bot [Tue, 1 Nov 2016 04:47:29 +0000 (04:47 +0000)]
Merge "Document diff/DifferenceEngine.php function"

7 years agoDon't parse <nowiki><span class="error"></nowiki>
Brad Jorsch [Mon, 31 Oct 2016 20:37:26 +0000 (16:37 -0400)]
Don't parse <nowiki><span class="error"></nowiki>

Which means we can't check if a parser limit was exceeded while trying
to expand the content of a tag, but that's probably not a huge loss.
It'll just result in potentially strange output rather than an exception.

Bug: T149622
Change-Id: I7910dfa0f61b1cc9168c7ed1498b2bda27c47f0e

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 31 Oct 2016 21:04:13 +0000 (22:04 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I3f98e468088f53f688b357ed1ebf7a36c0df0f0b

7 years agoMerge "Rename JobQueueDB::getSlaveDB() to getReplicaDB()"
jenkins-bot [Mon, 31 Oct 2016 20:33:31 +0000 (20:33 +0000)]
Merge "Rename JobQueueDB::getSlaveDB() to getReplicaDB()"

7 years agoAPI: Error if sensitive AuthManager parameters are in the query string
Brad Jorsch [Mon, 31 Oct 2016 17:41:17 +0000 (13:41 -0400)]
API: Error if sensitive AuthManager parameters are in the query string

There was only 1 hit in the feature usage log in the past 30 days for
this code path, so this should be good to go.

ApiLogin, on the other hand, received 27048 hits over the same time
period. So let's not do that one just yet.

Change-Id: I1ae3b928fda9ddc94c8182155637920713dd404d

7 years agoMerge "Allow empty href in SVGs"
jenkins-bot [Mon, 31 Oct 2016 14:32:39 +0000 (14:32 +0000)]
Merge "Allow empty href in SVGs"

7 years agoRemove spaces after cast operators
Sam Wilson [Mon, 31 Oct 2016 04:38:12 +0000 (12:38 +0800)]
Remove spaces after cast operators

This fixes the outstanding mis-spaced cast operators to bring them
into line with the coding standards on mediawiki.org (and with the
more common usage within this codebase).

Bug: T149545
Change-Id: Ib7bcf95bbee83d20c05f6d621ce7b4e1fb58a347

7 years agoAllow empty href in SVGs
Mark Holmquist [Mon, 31 Oct 2016 13:21:38 +0000 (08:21 -0500)]
Allow empty href in SVGs

bawolff is right, this shouldn't harm anything.

Bug: T149549
Change-Id: I377efdee7478940154ef5ec921bd0c8f7ec0c110

7 years agoMerge "FormatMetadata: Do not format 'UserComment' as a number"
jenkins-bot [Mon, 31 Oct 2016 13:01:28 +0000 (13:01 +0000)]
Merge "FormatMetadata: Do not format 'UserComment' as a number"

7 years agoFormatMetadata: Do not format 'UserComment' as a number
Bartosz Dziewoński [Mon, 31 Oct 2016 12:51:12 +0000 (13:51 +0100)]
FormatMetadata: Do not format 'UserComment' as a number

It's a freeform text field.

Change-Id: Ic3150f48c2e38fa26728bc22017b992d8ddfd152

7 years agoMerge "Don't show warning header for non-standard workflows on login-continue"
jenkins-bot [Mon, 31 Oct 2016 07:20:43 +0000 (07:20 +0000)]
Merge "Don't show warning header for non-standard workflows on login-continue"

7 years agoMerge "Add firstLetter data for ~50 additional languages"
jenkins-bot [Mon, 31 Oct 2016 07:01:33 +0000 (07:01 +0000)]
Merge "Add firstLetter data for ~50 additional languages"

7 years agoDocument diff/DifferenceEngine.php function
Yuri Astrakhan [Mon, 31 Oct 2016 00:26:08 +0000 (20:26 -0400)]
Document diff/DifferenceEngine.php function

Change-Id: I999824d8ce569de93fe4c9a889edea582d07611c

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 30 Oct 2016 21:08:27 +0000 (22:08 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I695ddf72027c55d160192f0ee4e88d6738a13fa6

7 years agoMerge "Make determineCoreSchema a public function again in DatabasePostgres"
jenkins-bot [Sat, 29 Oct 2016 22:28:38 +0000 (22:28 +0000)]
Merge "Make determineCoreSchema a public function again in DatabasePostgres"

7 years agoMake determineCoreSchema a public function again in DatabasePostgres
Paladox [Sat, 29 Oct 2016 22:09:52 +0000 (23:09 +0100)]
Make determineCoreSchema a public function again in DatabasePostgres

It was changed to a private function today, but it is called in
PostgresInstaller so it is causing this error

PHP Fatal error:  Call to private method
DatabasePostgres::determineCoreSchema() from context 'PostgresInstaller'
in /home/travis/build/paladox/mw/includes/installer/PostgresInstaller.php
on line 515

Caused by I2a067ca89a03f9ebf3f70a4f36ddae92e5b1e468

Change-Id: Ifac5a5c7dfeceeb8c7827d6d70e757633df77ca5

7 years agoMerge "Move LinkBatch operations for QueryPage to a helper function"
jenkins-bot [Sat, 29 Oct 2016 21:28:39 +0000 (21:28 +0000)]
Merge "Move LinkBatch operations for QueryPage to a helper function"

7 years agoMove LinkBatch operations for QueryPage to a helper function
Florian Schmidt [Sat, 29 Oct 2016 20:46:17 +0000 (22:46 +0200)]
Move LinkBatch operations for QueryPage to a helper function

This is easier to maintain as duplicated code everywhere.

This change also adds LinkBatch operations to specialpages, that does
not had it so far, but where it's useful.

Change-Id: I4936ecfb2be3a7709d99570c0561ab0cc9cd754f

7 years agoAdd missing Database::timestamp() calls
Aaron Schulz [Sat, 29 Oct 2016 16:16:39 +0000 (09:16 -0700)]
Add missing Database::timestamp() calls

This was broken for Postgres installations

Change-Id: I0c1d442e3cf1d9a4d5359e7a8f8fd02a31d1ac65

7 years agoMerge "Fix missing commit() flag in postgres savepoint class"
jenkins-bot [Sat, 29 Oct 2016 20:43:16 +0000 (20:43 +0000)]
Merge "Fix missing commit() flag in postgres savepoint class"

7 years agoMerge "Add LinkBatch to Special:UnwatchedPages"
jenkins-bot [Sat, 29 Oct 2016 20:28:09 +0000 (20:28 +0000)]
Merge "Add LinkBatch to Special:UnwatchedPages"

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 29 Oct 2016 20:05:39 +0000 (22:05 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ia735ef197567ad5151b508bc3b2851610f9b19a4

7 years agoAdd LinkBatch to Special:UnwatchedPages
umherirrender [Sat, 29 Oct 2016 18:26:10 +0000 (20:26 +0200)]
Add LinkBatch to Special:UnwatchedPages

Get all the information for blue links in one query.

Change-Id: I18cbaf69c5f75e00e48e27d4b5e7220f51c31808

7 years agoMerge "Make LBFactoryTest.php pass for sqlite"
jenkins-bot [Sat, 29 Oct 2016 16:55:23 +0000 (16:55 +0000)]
Merge "Make LBFactoryTest.php pass for sqlite"

7 years agoFix missing commit() flag in postgres savepoint class
Aaron Schulz [Sat, 29 Oct 2016 16:14:15 +0000 (09:14 -0700)]
Fix missing commit() flag in postgres savepoint class

Previously, the transaction was left dangling, causing massive
unit failure.

Change-Id: I8fb6e69b44ff0ceb0cf7c4fb45f204e140472406

7 years agoDon't show warning header for non-standard workflows on login-continue
Florian Schmidt [Wed, 21 Sep 2016 20:45:32 +0000 (22:45 +0200)]
Don't show warning header for non-standard workflows on login-continue

When a user needs/wants to login again (reauthentication or user account switch),
the Login special page shows a header to explain what happened ("already logged
in" or "need to re-authenticate"). For now, the form also displays this header
for a continued login workflow (e.g. when the user needs to enter secondary auth-
entication data, like a one time password). This is misleading, as the user already
knows what and why he has to login (again). Other error/warning messages are maybe
not as visible as they should be.

This change omits the header message for the login-continue auth action.

Bug: T146317
Change-Id: I2115bbe7965e8d0326f71872a4d33767dd0f956b

7 years agoAdd firstLetter data for ~50 additional languages
Brian Wolff [Sat, 29 Oct 2016 11:55:27 +0000 (11:55 +0000)]
Add firstLetter data for ~50 additional languages

Based on CLDR 29 data files.

This did the relatively easy languages in CLDR 29 (Which is most
of them). I skipped languages with complicated tailoring files.

Change-Id: I8367604f7d3a1cdef9cb4e15813893c8cbfff1ff

7 years agoRename JobQueueDB::getSlaveDB() to getReplicaDB()
Aaron Schulz [Sat, 29 Oct 2016 07:04:39 +0000 (00:04 -0700)]
Rename JobQueueDB::getSlaveDB() to getReplicaDB()

Change-Id: I7a88c4876e76836c92cc0b45b4e72124a087121c

7 years agoMake LBFactoryTest.php pass for sqlite
Aaron Schulz [Thu, 27 Oct 2016 05:44:08 +0000 (22:44 -0700)]
Make LBFactoryTest.php pass for sqlite

Change-Id: I4fe929e82218231f6c8afa64da8c0ccb42d2c362

7 years agoVarious small cleanups to DatabasePostgres
Aaron Schulz [Sat, 29 Oct 2016 05:14:26 +0000 (22:14 -0700)]
Various small cleanups to DatabasePostgres

* Add missing method visibilites
* Removed redundant doc blocks
* Use empty string for mSchema for consistency with
  the base class

Change-Id: I2a067ca89a03f9ebf3f70a4f36ddae92e5b1e468

7 years agoMerge "Postgres updater fixes to make update.php able to run"
jenkins-bot [Sat, 29 Oct 2016 01:31:01 +0000 (01:31 +0000)]
Merge "Postgres updater fixes to make update.php able to run"

7 years agoPostgres updater fixes to make update.php able to run
Aaron Schulz [Tue, 25 Oct 2016 18:56:41 +0000 (11:56 -0700)]
Postgres updater fixes to make update.php able to run

* Remove redundant schema prefix from relname=x query. The
  schema filtering is already done via the JOIN. The relname
  portion is just the table name not <schema>.<table name>.
* Avoid explicit table schema qualification and rely on the
  search path, as MW 1.27 did. Previously it only used the
  global $wgDBschema var to pass to determineCoreSchema()
  instead of keeping it in mSchema.
* Clean up some code duplication in Database::tableName() and
  make the code comments clearer.
* Make DatabasePostgres::tableName() use parent::tableName()
  instead of a method that just wraps this method. The intent
  seems clearer this way.
* Remove unused return value in
  PostgresUpdater::rebuildTextSearch().

Bug: T148628
Change-Id: Id11d9576b7c2fdad22ff7f90727c12997217a632

7 years agoMerge "Make updateCategoryCounts() have better lag checks"
jenkins-bot [Fri, 28 Oct 2016 21:28:40 +0000 (21:28 +0000)]
Merge "Make updateCategoryCounts() have better lag checks"

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 28 Oct 2016 20:03:35 +0000 (22:03 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ic7e8cf96d2bd8ca7a583824eea1ea4a3ed6429ac

7 years agoMerge "Add Parser to MediaWikiServices"
jenkins-bot [Fri, 28 Oct 2016 17:53:30 +0000 (17:53 +0000)]
Merge "Add Parser to MediaWikiServices"

7 years agoMerge "Introduce InterwikiLookupAdapter on top of SiteLookup"
jenkins-bot [Fri, 28 Oct 2016 13:25:18 +0000 (13:25 +0000)]
Merge "Introduce InterwikiLookupAdapter on top of SiteLookup"

7 years agoMerge "Pass context to ChangeTags::tagDescription"
jenkins-bot [Fri, 28 Oct 2016 11:31:44 +0000 (11:31 +0000)]
Merge "Pass context to ChangeTags::tagDescription"

7 years agoAdd space between label and selector
Matěj Suchánek [Fri, 28 Oct 2016 08:57:52 +0000 (08:57 +0000)]
Add space between label and selector

Change-Id: Id5c8c857a2a1339b0ce626bac98f0869e27d5a75

7 years agoParser test file editor
Tim Starling [Wed, 28 Sep 2016 06:32:17 +0000 (16:32 +1000)]
Parser test file editor

Add editTests.php, which provides an interactive interface to the
parser tests, with semi-automated editing.

Change-Id: I1a20d007ba4627d562a16c03849bbad7aec0e516

7 years agoMerge "PHPSessionHandler: Workaround PHP5 bug"
jenkins-bot [Fri, 28 Oct 2016 01:04:54 +0000 (01:04 +0000)]
Merge "PHPSessionHandler: Workaround PHP5 bug"

7 years agoMerge "Change .tocnumber to use grey text for section numbers in Table of Contents...
jenkins-bot [Thu, 27 Oct 2016 22:51:31 +0000 (22:51 +0000)]
Merge "Change .tocnumber to use grey text for section numbers in Table of Contents boxes"

7 years agoPass context to ChangeTags::tagDescription
cenarium [Wed, 28 Sep 2016 19:39:28 +0000 (21:39 +0200)]
Pass context to ChangeTags::tagDescription

To avoid wfMessage calls.

Change-Id: Icaa984fa8c69ccb38fbfd3e30877a4c572501c28

7 years agoMerge "Refactor rev_delete handling on deletion"
jenkins-bot [Thu, 27 Oct 2016 20:30:10 +0000 (20:30 +0000)]
Merge "Refactor rev_delete handling on deletion"

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 27 Oct 2016 20:01:18 +0000 (22:01 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I83ef5fa88f65ec941b87888943273892857d5561

7 years agoRemove tracking category stuff that accidentally slipped into 61adc1e14
Kunal Mehta [Thu, 27 Oct 2016 17:57:20 +0000 (10:57 -0700)]
Remove tracking category stuff that accidentally slipped into 61adc1e14

Bug: T149310
Change-Id: I0a3725a72b1467c57280ae1880935dd5fa54ae9e

7 years agoRefactor rev_delete handling on deletion
umherirrender [Thu, 27 Oct 2016 17:33:14 +0000 (19:33 +0200)]
Refactor rev_delete handling on deletion

Refactoring handling of the rev_delete database field, which is not
needed to select, when the suppress option is set.

Also added a new const, to avoid a comment about that things should be
15 ...

Change-Id: Ia5bcb835172bf6c10e2e872555fc67e91806ebe1

7 years agoFix reference in docs of HashConfig::set
Leszek Manicki [Thu, 27 Oct 2016 13:55:39 +0000 (15:55 +0200)]
Fix reference in docs of HashConfig::set

Change-Id: I82473e42a746ed4280ea22372d8d17d797070334

7 years agoMerge "UploadBase: Permit SVG files with broken namespace definition (Inkscape bug)"
jenkins-bot [Thu, 27 Oct 2016 10:49:57 +0000 (10:49 +0000)]
Merge "UploadBase: Permit SVG files with broken namespace definition (Inkscape bug)"

7 years agoUploadBase: Permit SVG files with broken namespace definition (Inkscape bug)
Bartosz Dziewoński [Wed, 5 Oct 2016 20:18:39 +0000 (22:18 +0200)]
UploadBase: Permit SVG files with broken namespace definition (Inkscape bug)

Inkscape mangles namespace definitions created by Adobe Illustrator
(apparently it can't parse custom entities or something, maybe just
in 'xmlns' attributes). These files are still valid SVG, and not
a security issue (although Illustrator probably won't like them),
so it's okay to allow them.

Added tests with some example files.

* buggynamespace-original.svg
  File generated by Illustrator (edited by hand to reduce filesize).
  Based on <https://commons.wikimedia.org/w/?curid=16495597>.

* buggynamespace-okay.svg
  The original file, opened and saved in Inkscape (no other changes).

* buggynamespace-okay2.svg
  The original file, opened and saved in Inkscape twice.

* buggynamespace-bad.svg
  The original file, edited by hand to remove custom entities.
  This is not valid XML and should be rejected (although it's valid
  when parsed as HTML, and some image viewers might display it).

* buggynamespace-evilhtml.svg
  An SVG file using an entity declared namespace for a namespace
  we want to ban. Based on buggynamespace-original.svg.

Bug: T144827
Change-Id: I0eb9766cab86a58d729f10033c64f57d2076d917

7 years agoMerge "New HTMLForm size filter field; add size filter to Special:Newpages"
jenkins-bot [Thu, 27 Oct 2016 05:53:03 +0000 (05:53 +0000)]
Merge "New HTMLForm size filter field; add size filter to Special:Newpages"

7 years agoMerge "Add short-circuit to DatabasePostgres::schemaExists()"
jenkins-bot [Thu, 27 Oct 2016 05:43:38 +0000 (05:43 +0000)]
Merge "Add short-circuit to DatabasePostgres::schemaExists()"

7 years agoMerge "Factor out some methods in the header generation"
jenkins-bot [Thu, 27 Oct 2016 02:48:43 +0000 (02:48 +0000)]
Merge "Factor out some methods in the header generation"

7 years agoNew HTMLForm size filter field; add size filter to Special:Newpages
This, that and the other [Thu, 27 Oct 2016 01:23:18 +0000 (12:23 +1100)]
New HTMLForm size filter field; add size filter to Special:Newpages

The conversion of SpecialNewpages to HTMLForm seems to be half-finished.
It's not using HTMLForm to read in the request query, which means we have
to roll our own logic. Kind of defeats the purpose of using HTMLForm in
the first place.

When ProtectedPages is converted to HTMLForm (T117722), it can use this new
field type.

Bug: T12817
Change-Id: I069609fbb37b18c3df25156779ad7ac7cd5d6813

7 years agoAdd short-circuit to DatabasePostgres::schemaExists()
Aaron Schulz [Wed, 26 Oct 2016 23:07:12 +0000 (16:07 -0700)]
Add short-circuit to DatabasePostgres::schemaExists()

Change-Id: I5221f7d937be1e87689df5a21fd64e244dbd4c2a

7 years agoRevert "Localisation updates from https://translatewiki.net."
Raimond Spekking [Wed, 26 Oct 2016 21:51:36 +0000 (21:51 +0000)]
Revert "Localisation updates from https://translatewiki.net."

Conflicts with https://gerrit.wikimedia.org/r/#/c/318151/

This reverts commit bc2fe61db26ef99f14b17be36476fc20a3bb4e0f.

Change-Id: Ib17efe29d4f78eb3508ffe57c3fa365b64aa1341

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 26 Oct 2016 20:22:24 +0000 (22:22 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I62a31a3a58174c1c4481bcfb51ab94cc17cac7d9

7 years agoAdd a grant for viewing restricted log entries
Brad Jorsch [Wed, 26 Oct 2016 19:20:17 +0000 (15:20 -0400)]
Add a grant for viewing restricted log entries

In core this holds the 'suppressionlog' right. SpamBlacklist and
TitleBlacklist would add their permissions here as well.

Bug: T149235
Change-Id: I8e2304e7b6f2af0c3d21d7d7390e4979b8eaee39

7 years agoFactor out some methods in the header generation
WMDE-Fisch [Wed, 26 Oct 2016 14:34:08 +0000 (16:34 +0200)]
Factor out some methods in the header generation

As preparation for some more minor refactoring there.

Change-Id: I31f585e5c4fcf724d9aaf670a21f4f0af42e98ce

7 years agoBump version number to 1.29.0-alpha for 1.29 development cycle
Chad Horohoe [Tue, 25 Oct 2016 22:56:37 +0000 (15:56 -0700)]
Bump version number to 1.29.0-alpha for 1.29 development cycle

Branch point was dc0f9b3a3a75e80a0c5f09dd76b4df1fcc05080d

The following commits missed the branch point and should probably
be backported because master reports them as 1.28
 - 4290f686c07265d40718fc3358f196de41bbde57
 - 81698d4c1605f491709e636acd5ca0e6857e3821
 - 40da8bf039019a2845405854a2d636be4bd3b98d
 - 95db9833dd8d75ff3dc44d587fdc3ad80332a500
 - 7bd97758f7e1496c7d4a1fa4e7275c9d6c01c5c3

Change-Id: I51562ba357b5533500ef9dd1e29107dd05cc9e1e

7 years agoMerge "Add documentation for wfClientAcceptsGzip()"
jenkins-bot [Tue, 25 Oct 2016 21:45:03 +0000 (21:45 +0000)]
Merge "Add documentation for wfClientAcceptsGzip()"

7 years agoAdd documentation for wfClientAcceptsGzip()
nicoco007 [Mon, 28 Dec 2015 20:35:53 +0000 (15:35 -0500)]
Add documentation for wfClientAcceptsGzip()

Change-Id: I18b9311d71278ca4c843908a11f77270f03cf534

7 years agoMerge "Localisation updates from https://translatewiki.net."
L10n-bot [Tue, 25 Oct 2016 20:29:50 +0000 (20:29 +0000)]
Merge "Localisation updates from https://translatewiki.net."

7 years agoMerge "Fix DatabaseSqlite IDEA warnings"
jenkins-bot [Tue, 25 Oct 2016 20:27:57 +0000 (20:27 +0000)]
Merge "Fix DatabaseSqlite IDEA warnings"

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 25 Oct 2016 20:20:09 +0000 (22:20 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I832a9f7f9ac7c4afd2c358fb506ac3a11f713414

7 years agoAdd class to EditPage text area when editing an old revision
cenarium [Wed, 20 Jan 2016 20:43:47 +0000 (21:43 +0100)]
Add class to EditPage text area when editing an old revision

This adds a class 'mw-textarea-oldrev' to the editing area when an old
page revision is edited. It seems that the warning MediaWiki:Editingold
is not sufficient for some users and some css tweaks might be
appreciated, as is already done for protected pages.

Bug: T124226
Change-Id: Ifc53af0f827a5cebfd9cc220b0aa247210e8dcfc

7 years agoFix DatabaseSqlite IDEA warnings
Aaron Schulz [Mon, 24 Oct 2016 22:19:21 +0000 (15:19 -0700)]
Fix DatabaseSqlite IDEA warnings

Change-Id: Idd52a27c853653e9ba64d765f4f526f5e8a13bcd

7 years agoParser functions now format numbers according to page language
Niklas Laxström [Thu, 30 Jan 2014 11:16:39 +0000 (11:16 +0000)]
Parser functions now format numbers according to page language

Also fixed incorrect return value documentation.

Bug: T62604
Change-Id: I1e16f20ca79436afe17eba711981b2ae43fed9e1

7 years agoresourceloader: Deprecate mw.Map
Timo Tijhof [Sat, 17 Sep 2016 22:50:47 +0000 (15:50 -0700)]
resourceloader: Deprecate mw.Map

This has never been used outside mediawiki.js for things like mw.config,
and mw.messages.

The public API of those objects will remain, but the constructor will
no longer be supported in the future in order to allow these to be
backed by native Map in the future (with a minimal polyfill rather than
a complete one).

* Remove 'mw.Map(valuesObject)'. (follows-up 63f8d7b9e5).
  This is incompatible with native Map and isn't actually used anywhere.

* Deprecate mw.Map#values. Undocumented and considered private.
  A few uses have appeared in the wild so keep a short deprecation period.

* Update the MediaWiki QUnit runner to construct new maps in setup/teardown
  instead of swapping the internal values object directly.
  Also update the runner to update mediawiki.jqueryMsg's parser default since
  it kept a reference to the first mw.messages object.

* Add 'logName' parameter to mw.log.deprecate(). Default logName
  of property key made sense for its original use case (deprecation warnings
  for global variables, which are a property of the window object). But
  for keys of any other object, we'll want to some context for the name.

* Remove redundant test expect numbers. (Follows-up 7c36375c4c7007d)

* Ensure mw.Map.prototype.constructor points to mw.Map.
  This was broken by 5819c37b3, which accidentally made it point to Object.

Bug: T146432
Change-Id: I7ff0b230608f5ca582fc6752b59c4bb998c78ba2

7 years agomediawiki.storage: Catch exceptions on window.localStorage property access
Timo Tijhof [Mon, 24 Oct 2016 23:00:45 +0000 (00:00 +0100)]
mediawiki.storage: Catch exceptions on window.localStorage property access

Follows-up 430a0d3984, which created a private property that stored a
reference to the localStorage object outside the get and set methods.

Where previously it was used directly, and as such, covered by
the try/catch around getItem and setItem calls.

Bug: T148998
Change-Id: Ibe75408913d4ffbf1791e1a6470296b29f809185

7 years agomw.loader: Fix off-by-one error in splitModuleKey()
Timo Tijhof [Tue, 25 Oct 2016 02:09:07 +0000 (03:09 +0100)]
mw.loader: Fix off-by-one error in splitModuleKey()

Follows-up 45bec76. This caused most localStorage cache entries from
mw.loader.store to be ignored because it'd store tje source code with
a version string that wrongly started with an "@".

As such, on the next page view, when comparing against the version
string from the startup manifest, it would mismatch and eventually
be pruned by mw.loader.store.

Change-Id: If14c80989c0bb28b7b209abe89f83d585c563987

7 years agoMerge "Swapping defaultbranch for track"
jenkins-bot [Tue, 25 Oct 2016 00:46:45 +0000 (00:46 +0000)]
Merge "Swapping defaultbranch for track"

7 years agoSwapping defaultbranch for track
Chad Horohoe [Mon, 24 Oct 2016 23:05:44 +0000 (16:05 -0700)]
Swapping defaultbranch for track

The former is a maintenance nightmare when branching.

Bug:T146293
Change-Id: Ic892c2f5778153f6e99107fe24dafc2c8797f86d

7 years agoMerge "Clean up newWANCacheFromParams() getInstance() calls"
jenkins-bot [Mon, 24 Oct 2016 23:34:31 +0000 (23:34 +0000)]
Merge "Clean up newWANCacheFromParams() getInstance() calls"

7 years agoMerge "Small DB classes IDEA warning fixes and cleanups"
jenkins-bot [Mon, 24 Oct 2016 23:30:54 +0000 (23:30 +0000)]
Merge "Small DB classes IDEA warning fixes and cleanups"

7 years agoMerge "Cleanup unused LBFactory $domain arguments"
jenkins-bot [Mon, 24 Oct 2016 23:11:29 +0000 (23:11 +0000)]
Merge "Cleanup unused LBFactory $domain arguments"

7 years agoCleanup unused LBFactory $domain arguments
Aaron Schulz [Mon, 24 Oct 2016 21:53:24 +0000 (14:53 -0700)]
Cleanup unused LBFactory $domain arguments

Change-Id: I17b409a71e263ff5e0175f6a35fb9c5288f00c11

7 years agoMerge "Remove redundant LoadBalancerSingle doc block"
jenkins-bot [Mon, 24 Oct 2016 21:25:25 +0000 (21:25 +0000)]
Merge "Remove redundant LoadBalancerSingle doc block"

7 years agoMerge "API: Update ApiOptions docs for I45f69997"
jenkins-bot [Mon, 24 Oct 2016 21:03:44 +0000 (21:03 +0000)]
Merge "API: Update ApiOptions docs for I45f69997"

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 24 Oct 2016 20:09:55 +0000 (22:09 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I0f0c8c41d403de7df04aa49aebf3c21c9e5d3957

7 years agoComments: Added phabricator IDs to bz bug #s
Yuri Astrakhan [Sun, 23 Oct 2016 01:46:14 +0000 (21:46 -0400)]
Comments: Added phabricator IDs to bz bug #s

Change-Id: Ia8d4e570e78c62e5c26bda0264fbf1efc74e58a2

7 years agoAdded array_replace_recursive merge strategy
Yuri Astrakhan [Tue, 18 Oct 2016 05:23:56 +0000 (01:23 -0400)]
Added array_replace_recursive merge strategy

For extension registry, add array_replace_recursive merge strategy,
as some extensions/configuration may prefer that to array_merge_recursive.

In some cases, configuration is merged from multiple extensions,
such as JsonConfig's $wgJsonConfigs configuration: ZeroBanner defines

"JsonZeroConfig": {
"namespace": 480,
"nsName": "Zero",
"isLocal": false,
"cacheKey": "1"
}

and mobile.php overrides it with
$wgJsonConfigs['JsonZeroConfig']['isLocal'] = false;
$wgJsonConfigs['JsonZeroConfig']['remote'] = [
'url' => 'https://zero.wikimedia.org/w/api.php',
'username' => $wmgZeroPortalApiUserName,
'password' => $wmgZeroPortalApiPassword,
];

Having identical value 'isLocal' would be converted into an array
if array_merge_recursive is used, but the replace strategy fixes it.

Change-Id: Ica6ddd0ae76f23e60de9b6235c6e2a3f2754a95d

7 years agoAPI: Update ApiOptions docs for I45f69997
Brad Jorsch [Mon, 24 Oct 2016 17:48:37 +0000 (13:48 -0400)]
API: Update ApiOptions docs for I45f69997

Now that we have an alternative multiple-value separator, the
documentation for action=options's change parameter should recommend
that instead of stating that values cannot contain pipes.

Change-Id: Ia0ff2c16be9cab3e1e303a5c7c618455167db31c

7 years agoPHPSessionHandler: Workaround PHP5 bug
Brad Jorsch [Mon, 24 Oct 2016 14:15:42 +0000 (10:15 -0400)]
PHPSessionHandler: Workaround PHP5 bug

PHP5 has a bug in handling boolean return values for
SessionHandlerInterface methods, it expects 0 or -1 instead of true or
false. See <https://wiki.php.net/rfc/session.user.return-value>.

PHP7 and HHVM are not affected.

No tests are added here because the only case where it actually makes a
difference is a can-never-happen branch.

Also, since I'm touching it already, add a @codeCoverageIgnore for the
code no longer tested thanks to I6e153ec8.

Change-Id: Id87478964b3985ed8bf4dd00bbc09f65ddfcc130