mediawiki.git
3 years agoSplit RELEASE-NOTES from 1.32.0-rc.1 and 1.32.0-rc.21.32.0
Reedy [Thu, 10 Jan 2019 22:02:43 +0000 (10 22:02 +0000)]
Split RELEASE-NOTES from 1.32.0-rc.1 and 1.32.0-rc.2

Change-Id: I4d6ff16ae3aea1eb707537b171ad760eb6663add

3 years agoRELEASE-NOTES: This is now a release
James D. Forrester [Thu, 10 Jan 2019 21:49:39 +0000 (10 13:49 -0800)]
RELEASE-NOTES: This is now a release

Change-Id: I18c383b188ef78aa54bc51c0f24294541818108f

3 years agoFix $magicWords for the Sanskrit language
Jayprakash12345 [Sat, 30 Jun 2018 13:20:44 +0000 (30 18:50 +0530)]
Fix $magicWords for the Sanskrit language

Bug: T102320
Change-Id: I4ef78dc7a41916a9af6aa259de455e3948662913
(cherry picked from commit eb741da7a18c7f52dc2e2b55c4f34e69362b5c7f)

3 years agoFix slow queries in migrateActors.php
Brad Jorsch [Mon, 17 Dec 2018 17:26:13 +0000 (17 12:26 -0500)]
Fix slow queries in migrateActors.php

MariaDB really doesn't like the complicated OR in the join condition for
the actor table, it winds up scanning the whole actor table to find the
match. After trying several different options, the best bet seems to be
to use subqueries to get the actor_id.

MariaDB also doesn't like the DISTINCTed query for log_search, it gets
confused if the selected fields contain other fields much like it
historically gets confused when GROUP BY contains fields that are
constant in the WHERE clause. So we'll do the select from log_search in
a subquery and then join with actor, and inject the constant ls_field
into the rows as a constant field.

Bug: T188327
Change-Id: I979c040441f83bdf36e2f4031152559391233e5f
(cherry picked from commit 117a6c51f2fad6f6395df742c404a359e31185fb)

3 years agoBump $wgVersion to 1.32.0
Mukunda Modell [Thu, 10 Jan 2019 20:34:41 +0000 (10 14:34 -0600)]
Bump $wgVersion to 1.32.0

Preparing for the MediaWiki 1.32.0 final tarball release.

Change-Id: I9734b013f4cde3e8531107ea7b1f1356fec5bfb5

3 years agoBump wgVersion to 1.32.0-rc.21.32.0-rc.2
Mukunda Modell [Thu, 3 Jan 2019 23:59:31 +0000 (3 17:59 -0600)]
Bump wgVersion to 1.32.0-rc.2

Change-Id: I9315052211e9df3497e353a743c1a96e13ee9ca5

3 years agoUser: Bypass repeatable-read when creating an actor_id
Brad Jorsch [Thu, 29 Nov 2018 14:03:20 +0000 (29 09:03 -0500)]
User: Bypass repeatable-read when creating an actor_id

When MySQL is using repeatable-read transaction isolation (which is the
default), the following sequence of events can occur:

1. Request A: Begin a transaction.
2. Request A: Try to select the actor ID for a user. Find no rows.
3. Request B: Insert an actor ID for that user.
4. Request A: Try to insert an actor ID for the user. Fails because one
   exists.
5. Request A: Try to select the actor ID that must exist. Fail because of
   the snapshot created at step 2.

In MySQL we can avoid this issue at step #5 by using a locking select
(FOR UPDATE or LOCK IN SHARE MODE), so let's do that.

Bug: T210621
Change-Id: I6c1d255fdd14c6f49d2ea9790e7bd7d101e98ee4
(cherry picked from commit 37f48fdb25a78ba7623c57b50cdfd842292d3ccb)

3 years agoRELEASE-NOTES-1.32: Add notes for T210307
James D. Forrester [Sat, 22 Dec 2018 11:59:33 +0000 (22 11:59 +0000)]
RELEASE-NOTES-1.32: Add notes for T210307

Change-Id: I02e9430755ac062808ee2d182244272124efcad6

3 years agoMerge "Fix the cache timestamp for forced updates." into REL1_32
jenkins-bot [Sat, 22 Dec 2018 11:27:35 +0000 (22 11:27 +0000)]
Merge "Fix the cache timestamp for forced updates." into REL1_32

3 years agoFix the cache timestamp for forced updates.
daniel [Sat, 24 Nov 2018 15:59:58 +0000 (24 16:59 +0100)]
Fix the cache timestamp for forced updates.

Without this patch, the forcelinksupdate parameter of ApiPurge
was inoperational, caused by the fact that RefreshLinksJob got
the original revision's timestamp in the rootJobTimestamp parameter,
instead of the time at which the new ParserOutput was created.

See <https://phabricator.wikimedia.org/T210307#4771586> for details.

Bug: T210307
Change-Id: I281d6d0ed112b35e160775e528d363ce4770990a
(cherry picked from commit be2bde8705e73a881ba034f2185cfd6da25b34a3)

3 years agoMerge "Set the SaveParser logger in RevisionRenderer" into REL1_32
jenkins-bot [Fri, 21 Dec 2018 22:52:01 +0000 (21 22:52 +0000)]
Merge "Set the SaveParser logger in RevisionRenderer" into REL1_32

3 years agoregistration: Add release notes for platform requirements
MGChecker [Thu, 20 Dec 2018 23:52:35 +0000 (21 00:52 +0100)]
registration: Add release notes for platform requirements

This adds release notes for I510de1e6d80 and I6744cc0be2.

Bug: T197535
Change-Id: I563012dd7f398c4892ec8a4ecab6144bc589d441
(cherry picked from commit 6365da68786f24f78ee34545572f9b9610cf50d4)

3 years agoSet the SaveParser logger in RevisionRenderer
Aaron Schulz [Mon, 29 Oct 2018 22:48:22 +0000 (29 15:48 -0700)]
Set the SaveParser logger in RevisionRenderer

Change-Id: Iacc28ce583fed8cf2a7f7b931754c64619cb4917

3 years agoApiDelete: Handle batched deletions properly
Brad Jorsch [Thu, 20 Dec 2018 14:59:02 +0000 (20 09:59 -0500)]
ApiDelete: Handle batched deletions properly

When batched deletions via the job queue were added in Ie800fb5a, the
way this was reported caused ApiDelete to report an error. Instead it
should report success with appropriate signaling to the client.

Bug: T212356
Change-Id: I1ef66277e988572c6720cf3e3cb36b18530746b4
(cherry picked from commit db67de7fad899de33d4c8e3b6ee8189f8570d826)

3 years agoUpdate git submodules
Alexia E. Smith [Thu, 15 Nov 2018 16:09:15 +0000 (15 10:09 -0600)]
Update git submodules

* Update extensions/ParserFunctions from branch 'REL1_32'
  to 15fe1aa53eb164467498633e0f6bc5ad63d481ac
  - Fix E_WARNING with {{#pos:}} if the offset is larger than the string

    The mb_strpos() function throws E_WARNING if the offset is longer
    than the length of the string.

    Bug: T209600
    Change-Id: Ib4296ba136eaf5c8461681e9d5f108118b2494f4
    (cherry picked from commit cf1480cb9629514dd4400b1b83283ae6c83ff163)

3 years agoMerge "i18n: Clarify the default sidebar 'Help' link is about MediaWiki itself" into...
jenkins-bot [Wed, 19 Dec 2018 12:28:28 +0000 (19 12:28 +0000)]
Merge "i18n: Clarify the default sidebar 'Help' link is about MediaWiki itself" into REL1_32

3 years agoFix copy-paste error
Amir Sarabadani [Tue, 18 Dec 2018 17:55:13 +0000 (18 18:55 +0100)]
Fix copy-paste error

It's actually adding the column on the wrong table

Change-Id: I2fd8ea50f3eb4b5da04fce2ea0348a2dc6329965

3 years agoApiComparePages: Don't error with no prev/next rev
Brad Jorsch [Mon, 22 Oct 2018 16:13:01 +0000 (22 12:13 -0400)]
ApiComparePages: Don't error with no prev/next rev

Prior to I700edfa76, torelative=prev on the first revision of a page
would "diff" from an empty revision, and torelative=next on the latest
revision would diff to that same latest revision. People were depending
on that behavior, so restore it.

Bug: T203433
Change-Id: Ie81b58c196998a8047322740fe1d1fa44eff8526
(cherry picked from commit cf4f985f225f843acab6c3b56ce78cc12ffc2fc6)

3 years agoi18n: Clarify the default sidebar 'Help' link is about MediaWiki itself
Andre Klapper [Thu, 29 Nov 2018 10:09:34 +0000 (29 11:09 +0100)]
i18n: Clarify the default sidebar 'Help' link is about MediaWiki itself

Enough users of third-party MediaWiki installations seem to think it is a
link to a help forum for the topic of that installation, and not for
MediaWiki.

Bug: T209335
Change-Id: I6614b7a5c06de3ffca7ddbb10ea75450e7c6f183
(cherry picked from commit ac0a3f17cf46b7733fcc1d0cef65febb1d04b7b6)

3 years agoSet default of sleep time in populateChangeTagDef to zero
Amir Sarabadani [Sat, 15 Dec 2018 17:28:54 +0000 (15 18:28 +0100)]
Set default of sleep time in populateChangeTagDef to zero

The script already has waitForReplication(), that's good for non-WMF setups

Bug: T206568
Change-Id: I020a4472796eeff2561da6c17a817091d4e9af5a
(cherry picked from commit b6c2caf11d0587f3977a7720cf103226af25e37e)

3 years agoMerge "Upgrade wikimedia/ip-set to 1.3.0" into REL1_32
jenkins-bot [Tue, 18 Dec 2018 05:47:04 +0000 (18 05:47 +0000)]
Merge "Upgrade wikimedia/ip-set to 1.3.0" into REL1_32

3 years agoUpdate git submodules
Kunal Mehta [Tue, 18 Dec 2018 04:03:32 +0000 (17 20:03 -0800)]
Update git submodules

* Update vendor from branch 'REL1_32'
  to 384dcfad311e8337b9d87eeffaa640bfb8bce98c
  - Upgrade wikimedia/ip-set to 1.3.0

    Change-Id: Ice4e86cc9927fc74433c6185397b2bde62f10bca

3 years agoUpgrade wikimedia/ip-set to 1.3.0
Kunal Mehta [Tue, 18 Dec 2018 04:05:05 +0000 (17 20:05 -0800)]
Upgrade wikimedia/ip-set to 1.3.0

Bug: T209756
Depends-On: Ice4e86cc9927fc74433c6185397b2bde62f10bca
Change-Id: I034ca4a1135cfcba93d4c636a4cdd8789d91537c

3 years agoCreate JobQueueEnqueueUpdate class to call JobQueueGroup::pushLazyJobs()
Aaron Schulz [Wed, 24 Oct 2018 19:28:02 +0000 (24 12:28 -0700)]
Create JobQueueEnqueueUpdate class to call JobQueueGroup::pushLazyJobs()

This assures that MergeableUpdate tasks that lazy push job will actually
have those jobs run instead of being added after the lone callback update
to call JobQueueGroup::pushLazyJobs() already ran.

This also makes it more obvious that push will happen, since a mergeable
update is added each time lazyPush() is called and a job is buffered,
rather than rely on some magic callback enqueued into DeferredUpdates at
just the right point in multiple entry points.

Bug: T207809
Change-Id: I13382ef4a17a9ba0fd3f9964b8c62f564e47e42d
(cherry picked from commit 6030e9cf2c1df7929e2319602aa4d37aa641de11)

3 years agoPostgreSQL: Drop three unused columns
Kevin Israel [Mon, 9 Jul 2018 15:28:59 +0000 (9 11:28 -0400)]
PostgreSQL: Drop three unused columns

The columns dropped in this commit are:

* category.cat_hidden
  (for MySQL, dropped in 1.20 / 0cbc85494d47cdeb)
* site_stats.ss_admins
  (for MySQL, dropped in 1.21 / bd602d20833f435f)
* recentchanges.rc_cur_time
  (for MySQL, dropped in 1.24 / 2b441eba406f2c49)

Bug: T64103
Change-Id: I7a7e9a2ac5066a9c9ab2583419d507e14fdd8c2c
(cherry picked from commit ba1207d5d582f4ce9cb8a9c0cfe8f083fd9e366f)

3 years agobump wgVersion to 1.32.0-rc.11.32.0-rc.1
Mukunda Modell [Tue, 11 Dec 2018 16:52:21 +0000 (11 10:52 -0600)]
bump wgVersion to 1.32.0-rc.1

Change-Id: Ib779ef76e851d7e430cd87f57d3fab2f7122290e

3 years agoImageListPager: Actor migration for buildQueryConds()
Brad Jorsch [Tue, 4 Dec 2018 16:08:08 +0000 (4 11:08 -0500)]
ImageListPager: Actor migration for buildQueryConds()

This method got missed in I8d825eb0.

Bug: T211061
Change-Id: Ice7446e54a42cbf48eae2a2092862a722650086c
(cherry picked from commit 86b081aa4100bfde2c4903c16fd593f485954326)

3 years agoSave value from CLI installers `--lang` argument
rvogel [Mon, 3 Dec 2018 10:48:08 +0000 (3 11:48 +0100)]
Save value from CLI installers `--lang` argument

This way the value of `--lang` is available to `LocalSettingsGenerator`.

Bug: T210998
Change-Id: I8b6bd83603687e4d23fc7e0642c3b8f27157b62d
(cherry picked from commit 996ac9f61e34db8b5d50ca9574a021e422cf9030)

3 years agoMerge "Use our fork of less.php" into REL1_32
jenkins-bot [Tue, 4 Dec 2018 04:20:19 +0000 (4 04:20 +0000)]
Merge "Use our fork of less.php" into REL1_32

3 years agoUpdate git submodules
Max Semenik [Mon, 3 Dec 2018 18:45:40 +0000 (3 10:45 -0800)]
Update git submodules

* Update vendor from branch 'REL1_32'
  to 174d4390921e080caa1ff251f1be401e668bcc29
  - Use our own fork of less.php

    Bug: T206975
    Change-Id: I06f1e43b0f12f9b56f9dff55a92b5ae4546acfcc

3 years agoUse our fork of less.php
Max Semenik [Tue, 16 Oct 2018 07:00:30 +0000 (16 00:00 -0700)]
Use our fork of less.php

Supports PHP 7.3, among other things

Bug: T206975
Depends-On: I06f1e43b0f12f9b56f9dff55a92b5ae4546acfcc
Change-Id: I84c5ed8ac0ae1c382ba035b37dc88ccd69494ac3

3 years agoMerge "Backfill release notes for Iaf531795" into REL1_32
jenkins-bot [Thu, 22 Nov 2018 07:18:06 +0000 (22 07:18 +0000)]
Merge "Backfill release notes for Iaf531795" into REL1_32

3 years agoSQL syntax error in MS-SQL file
Seb35 [Tue, 20 Nov 2018 14:25:09 +0000 (20 15:25 +0100)]
SQL syntax error in MS-SQL file

Bug: T209870
Change-Id: I91e4f8472832c4bb17eb1d185db1bcbde57a9287
(cherry picked from commit e1100d2d53baa71d20cc282b6dc0a950b080aaad)

3 years agoMerge "Drop the image_comment_temp table" into REL1_32
jenkins-bot [Wed, 21 Nov 2018 00:46:01 +0000 (21 00:46 +0000)]
Merge "Drop the image_comment_temp table" into REL1_32

3 years agoBackfill release notes for Iaf531795
Gergő Tisza [Tue, 20 Nov 2018 20:34:14 +0000 (20 20:34 +0000)]
Backfill release notes for Iaf531795

Change-Id: Ie7cec79675a3757fc0bb1b0a8f0c4e8c5d372f87

3 years agoUse $revQuery['joins'] in query in populateSearchIndex
Paladox [Mon, 19 Nov 2018 21:29:44 +0000 (19 21:29 +0000)]
Use $revQuery['joins'] in query in populateSearchIndex

Bug: T209885
Change-Id: Iaf53179535030064788eb107c4ebdd398ed306e4

3 years agoUpdate git submodules
RazeSoldier [Sat, 10 Nov 2018 07:32:34 +0000 (10 15:32 +0800)]
Update git submodules

* Update extensions/LocalisationUpdate from branch 'REL1_32'
  to 57ac77809ce7691ab40e3d6cf399ec6b7d7436e5
  - Use "break" instead of "continue" inside a switch

    "continue" statements in a switch are equivalent to "break". In PHP 7.3, will generate a warning.

    Bug: T206976
    Change-Id: I7e28a59918edbbcc741a64c6c0ed2a55bd650384
    (cherry picked from commit fa93fda37e308a83e3211f53c8f828b5c3482c07)

3 years agoDrop the image_comment_temp table
Brad Jorsch [Wed, 7 Mar 2018 20:25:53 +0000 (7 15:25 -0500)]
Drop the image_comment_temp table

It is no longer used.

Bug: T188132
Change-Id: Ic8efeddc030f48e82ba861926121b64eca37d169
(cherry picked from commit d099bb6f9578625bc79f613f65e78ca12b4bbb96)

3 years agoUpdate git submodules
Derk-Jan Hartman [Wed, 14 Nov 2018 20:01:22 +0000 (14 21:01 +0100)]
Update git submodules

* Update extensions/WikiEditor from branch 'REL1_32'
  to aea465f99e322b5dc9f06b676184812d775a2c3a
  - Modules: Protect against loading modules twice

    Bug: T189029
    Change-Id: Ie0dff9c1dfa8e3a0927f2915a9a237dff739289a
    (cherry picked from commit 0161e37e6e67ac6eb76fbc0bea4f299e17fcdda2)

3 years agoUpdate git submodules1.32.0-rc.0
Kunal Mehta [Fri, 9 Nov 2018 19:27:15 +0000 (9 11:27 -0800)]
Update git submodules

* Update vendor from branch 'REL1_32'
  to 90fef8279a44622b14cf9d84de7f051a4c50b9bd
  - Remove non-tarball dependencies from release branch

    Just like we did in REL1_31.

    Change-Id: Ib52116409112a10a7f7c587660eb060b17f33d12

3 years agoAdd test for completionSearch with wgCapitalLinkOverrides
David Causse [Tue, 6 Nov 2018 13:35:03 +0000 (6 14:35 +0100)]
Add test for completionSearch with wgCapitalLinkOverrides

Bug: T208255
Change-Id: Id2299a013b2dc9b5391d400d7c7c4dc37185f714

3 years agoMerge "Follow-up cfa70ea6d0: Fix rebase artefact, also remove preference listing...
jenkins-bot [Tue, 6 Nov 2018 01:39:30 +0000 (6 01:39 +0000)]
Merge "Follow-up cfa70ea6d0: Fix rebase artefact, also remove preference listing" into REL1_32

3 years agoMerge "Remove old "bulletin board style toolbar" from core" into REL1_32
jenkins-bot [Tue, 6 Nov 2018 01:39:23 +0000 (6 01:39 +0000)]
Merge "Remove old "bulletin board style toolbar" from core" into REL1_32

3 years agoPreferences::miscPreferences: Hard-deprecate this
James D. Forrester [Mon, 5 Nov 2018 18:53:02 +0000 (5 10:53 -0800)]
Preferences::miscPreferences: Hard-deprecate this

Change-Id: Ic1bdf7fc132a1410af1ac24a4c0b8fbad3a6158e
(cherry picked from commit 8e704104d595f1381122f16cf1a9e41f9e45842a)

3 years agocomposer.json, require ext-fileinfo
addshore [Mon, 24 Sep 2018 08:25:53 +0000 (24 09:25 +0100)]
composer.json, require ext-fileinfo

PHPVersionCheck requires fileinfo be installed for mime_content_type

Change-Id: Iea7d2c7842c770e77c05265d4f4b08b17f9ab71f
(cherry picked from commit 139bf5bc7b66c83bd5a27d4fc6806ddaebe3f188)

3 years agoDeprecate OutputPage::parse() and OutputPage::parseInline()
C. Scott Ananian [Fri, 26 Oct 2018 15:14:01 +0000 (26 11:14 -0400)]
Deprecate OutputPage::parse() and OutputPage::parseInline()

The OutputPage::parse() and OutputPage::parseInline() methods behave
misleadingly different from the OutputPage::addWikitext*() methods:
they don't tidy their output, they have different defaults for
interface/content language selection, and they (sometimes) add
wrapper divs.  Deprecate these and add new methods with tidy output,
clear language selection, and consistent defaults:
OutputPage::parseAsContent(), OutputPage::parseAsInterface(),
and OutputPage::parseInlineAsInterface().

Unify the implementation of the parse* methods with the addWikiText*
methods, to reduce the likelihood that the behavior will diverge again
in the future.

Bug: T198214
Change-Id: Ica79c2acbc542ef37f971c0be2582ae771a23bd0
(cherry picked from commit a3f63785eebfa2f729d42da880b6722736ef1e7d)

3 years agoFix OutputPage::parseInternal() by stripping <div> wrapper
C. Scott Ananian [Fri, 26 Oct 2018 14:05:34 +0000 (26 10:05 -0400)]
Fix OutputPage::parseInternal() by stripping <div> wrapper

We should probably strip the <div> wrapper in OutputPage::parse() as
well: this behavior was added in 1.30, but it only applies when
$interface is false.  However, that requires a more careful audit
(a lot more places call parse() than parseInline()) and so I'll defer
that for now.

Change-Id: Iad5412f03af29c04deb653969dd71f6c86f0ae50
(cherry picked from commit db4fa6fb9ffc4601e7a02b6c30f22962db63615c)

3 years agoMerge "API: Set robots noindex,nofollow on HTML output" into REL1_32
jenkins-bot [Thu, 1 Nov 2018 07:09:02 +0000 (1 07:09 +0000)]
Merge "API: Set robots noindex,nofollow on HTML output" into REL1_32

3 years agoRecognize CSS/JS redirects with non-ASCII targets
Kunal Mehta [Tue, 30 Oct 2018 02:30:59 +0000 (29 19:30 -0700)]
Recognize CSS/JS redirects with non-ASCII targets

The regex in JavaScriptContent and CssContent was trying to pass
urlencoded stuff to Title::newFromText(), which would fail. Make sure we
urldecode it first.

Bug: T208264
Change-Id: I189c4c308da2875839ad8c1061332500f0e6d244
(cherry picked from commit 674e486cb5e47c4467b98dd6a961b2ba4787043b)

3 years agoUpdate git submodules
Niklas Laxström [Wed, 24 Oct 2018 08:33:04 +0000 (24 10:33 +0200)]
Update git submodules

* Update extensions/LocalisationUpdate from branch 'REL1_32'
  to 69d602116f4339a3bd4d042aa7f38114653e46af
  - Handle exceptions from GitHubFetcher

    If a l10n directory is not found, log a message but continue.

    This commit introduces some output to normal update.php run, which
    can be disabled with the --quiet switch.

    Bug: T176390
    Change-Id: Ic1001303aef859d325e307edd4348364cab9ed7d
    (cherry picked from commit db84ba6ed2b4e255c844171db545fa451da08e1f)

3 years agoUpdate git submodules
C. Scott Ananian [Wed, 17 Oct 2018 16:46:25 +0000 (17 12:46 -0400)]
Update git submodules

* Update extensions/ConfirmEdit from branch 'REL1_32'
  to 4a925f4bfd32d5405154707a803440279c688fb1
  - Replace deprecated untidy OutputPage::addWikiText() method

    The replacement OutputPage::addWikiMsg() method is ancient, and so
    no bump to the minimum required MW version is needed.

    Bug: T198214
    Change-Id: I082bfb4585632dc37464d04aa93938ca05a9fdd0
    (cherry picked from commit d22d1e88f47ac567dcb2f4a643f7afaeb43ae0a9)

3 years agoHard deprecate $wgTidyConfig['driver'] = 'disabled'
C. Scott Ananian [Fri, 26 Oct 2018 02:02:47 +0000 (25 22:02 -0400)]
Hard deprecate $wgTidyConfig['driver'] = 'disabled'

This was already deprecated in the release notes, and is not used in
production, but I'd overlooked adding an appropriate hard deprecation
notice in MWTidy::factory() to notify downstream users.

Change-Id: I8f4d8154a1d8a233017f54f0fb4bcfdf4a0373e1
(cherry picked from commit 661c43f3ebea4256e32fb0523cbc9a7f198b635f)

3 years agoAPI: Set robots noindex,nofollow on HTML output
Brad Jorsch [Thu, 25 Oct 2018 13:31:31 +0000 (25 09:31 -0400)]
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
(cherry picked from commit 46875ad86141fe614eeadbaa843204fa80967218)

3 years agoAvoid broken markup due to conversion table DB queries in Installer:parse()
Aaron Schulz [Sat, 27 Oct 2018 23:41:33 +0000 (27 16:41 -0700)]
Avoid broken markup due to conversion table DB queries in Installer:parse()

Bug: T207979
Change-Id: I6a196a64865533a073fadc4a07f5627b67924921
(cherry picked from commit 387071ecc21387f1e68aacf4d20144a6423df8b6)

3 years agoresoureloader: Restore support for plain callbacks in mediawiki.base's RLQ
Timo Tijhof [Fri, 26 Oct 2018 21:33:26 +0000 (26 14:33 -0700)]
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
(cherry picked from commit cb7e0ea507c55b49fd22f734fbfe048fe87d5557)

3 years agoFollow-up cfa70ea6d0: Fix rebase artefact, also remove preference listing
James D. Forrester [Wed, 24 Oct 2018 14:58:47 +0000 (24 07:58 -0700)]
Follow-up cfa70ea6d0: Fix rebase artefact, also remove preference listing

Change-Id: Ia146f013beba2c82a8f76355b49a4192fbd0ed3b
(cherry picked from commit 9c32d7bcf4c7640c5c8d8564179753590aa2b283)

3 years agoRemove old "bulletin board style toolbar" from core
James D. Forrester [Thu, 20 Oct 2016 21:26:22 +0000 (20 14:26 -0700)]
Remove old "bulletin board style toolbar" from core

With this change, MediaWiki will no longer have a 'JavaScript-powered'
wikitext toolbar, and instead sysadmins will be required to choose one
(or more) of the several extensions available for this purpose if they
need the functionality. For over half a decade MediaWiki's tarball has
included the 2010-era replacement for this feature, WikiEditor. We are
now working on replacing even that, with the 2013-era visual editor, a
mode of which is the forthcoming 2017-era wikitext editor, and several
more specialised editors like CodeEditor.

Beyond this, the core editor toolbar is ancient, un-loved, and is used
only exceptionally rarely, mostly by accident. It is unhelpful to give
implicitly this as the primary editor for MediaWiki just because we've
not removed it from core when it is not a very good experience for any
kind of user, and has not received the attention that users deserve to
be worth retaining in core.

The old core preference, which was intended to govern whether this old
toolbar should be shown, has since mutated into whether the to run the
EditPageBeforeEditToolbar hook. The hook is used by several extensions
to provide toolbars in lieu of the core one. This preference has been,
in practice, a very confusing preference for MediaWiki users, who have
to interact with quite similar preferences to toggle their real editor
which sit next to this one on the preferences page. Consequently, this
preference is also removed.

The code could be made into an extension for those (very few) users of
MediaWiki who might want to keep on using it. However, the author will
offer their services but not their encouragement in said undertaking.

Bug: T30856
Bug: T32795
Change-Id: I2b05f0ca25873ad8e0b33a5e4938bef52c4e9347
(cherry picked from commit cfa70ea6d003ae69d52aad67a543912449c71e00)

3 years agoDisable $wgEnableImageWhitelist by default
Kunal Mehta [Wed, 24 Oct 2018 22:39:53 +0000 (24 15:39 -0700)]
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
(cherry picked from commit d47e2822bc06ad8069718b76b3f228e9f6c0a218)

3 years agoMerge "RELEASE-NOTES-1.32: Add all new/changed libraries in composer.json" into REL1_32
jenkins-bot [Wed, 24 Oct 2018 18:17:51 +0000 (24 18:17 +0000)]
Merge "RELEASE-NOTES-1.32: Add all new/changed libraries in composer.json" into REL1_32

3 years agoMerge "Fix slow query counting by unindexed field ar_page_id" into REL1_32
jenkins-bot [Wed, 24 Oct 2018 18:13:29 +0000 (24 18:13 +0000)]
Merge "Fix slow query counting by unindexed field ar_page_id" into REL1_32

3 years agoMerge "fix stubs dump query to use straight join" into REL1_32
jenkins-bot [Wed, 24 Oct 2018 18:10:56 +0000 (24 18:10 +0000)]
Merge "fix stubs dump query to use straight join" into REL1_32

3 years agoRELEASE-NOTES-1.32: Add all new/changed libraries in composer.json
James D. Forrester [Tue, 23 Oct 2018 17:56:52 +0000 (23 10:56 -0700)]
RELEASE-NOTES-1.32: Add all new/changed libraries in composer.json

Change-Id: I50b47470b531b04642913b36dc7b4282476df6db
(cherry picked from commit 14f6a1aff04fadee9e02738ae6253405bf5c8f56)

3 years agoRELEASE-NOTES-1.32: Add all new/changed libraries in resources/lib
James D. Forrester [Tue, 23 Oct 2018 17:52:51 +0000 (23 10:52 -0700)]
RELEASE-NOTES-1.32: Add all new/changed libraries in resources/lib

Change-Id: I1dffba3bb31850e1a2f1529c49329ba7c9c7d4a7
(cherry picked from commit bbeb3e4d80f26e258ad74a30ab704fa2a0cc537c)

3 years agoFix slow query counting by unindexed field ar_page_id
Tim Starling [Wed, 24 Oct 2018 00:21:28 +0000 (23 17:21 -0700)]
Fix slow query counting by unindexed field ar_page_id

Bug: T207530
Change-Id: I81a70ca03fd219d2e96b17714645d9cc4f99b3b9
(cherry picked from commit f7fb00c8f8702ff5d4c7974474bb4e6bd5c9125f)

3 years agofix stubs dump query to use straight join
Ariel T. Glenn [Tue, 23 Oct 2018 15:18:47 +0000 (23 18:18 +0300)]
fix stubs dump query to use straight join

regression from a combination of
https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/380669/
and
https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/459885/

We have to do a straight join for all stubs, since they all
now order revisions by rev_id after deployment of the second
patchset above.

Bug: T207628
Change-Id: I4d2a311c14c66d4813eb9fc3c587fa3ddb958454
(cherry picked from commit 1113b1203cbc1049fb1d01e975ff9a531d72a408)

3 years agoMake Language::hasVariant() more strict
C. Scott Ananian [Fri, 19 Oct 2018 19:00:52 +0000 (19 15:00 -0400)]
Make Language::hasVariant() more strict

In d59f27aeab08b171e5ab6a081e763a4cad0bca04 we made
LanguageConverter::validateVariant() try harder to convert a variant
into an acceptable MediaWiki-internal form, looking at deprecated
codes and BCP 47 aliases.  However, this misled Language::hasVariant()
into thinking that bogus names (like all-uppercase strings) were
acceptable variant names, which then led exceptions when they were
passed to the various conversion methods.

This is a belt-and-suspenders patch for T207433 -- in that case we
shouldn't have created a Language object with code 'sr-cyrl' in the
first place, but once one was created we shouldn't have tried to
ask LanguageSr to convert texts to 'sr-cyrl'.  The latter problem
is fixed by this patch.

Bug: T207433
Change-Id: Id993bc7989144b5031a551662e8e492bd23f698a
(cherry picked from commit fcbde8ae4ec6890eca9cebcce6db3fc22c8a20d8)

3 years agoInclude BCP 47 codes in $wgDummyLanguageCodes, but deprecate it
C. Scott Ananian [Fri, 19 Oct 2018 14:40:38 +0000 (19 10:40 -0400)]
Include BCP 47 codes in $wgDummyLanguageCodes, but deprecate it

Add BCP 47 codes to $wgDummyLanguageCodes to ensure that
Language::factory() will return a valid MediaWiki-internal code if
given a BCP 47 alias.  We will want to make $wgDummyLanguageCodes a
private property of LanguageCode eventually, but let's start with
removing it from user configuration.

Setting $wgDummyLanguageCodes in LocalSettings.php has been deprecated
since 1.29.  Hard deprecate adding entries to $wgDummyLanguageCodes so
that we can eventually remove manual overrides from user
configuration.

This is a follow-up to 48ab87d0a37da80c2e2ae3a20f645548d2a787f9,
which described the various categories of codes, and
21ead7a98d1a103b77f1e3ba29a85493782d398b, which added the correct
BCP 47 mappings.

Bug: T207433
Change-Id: I9f6dda3360f79ab65f6392f44c98926588d851c8
(cherry picked from commit f2e0516934c489bd6883b7602d57accf959018e0)

3 years agoBump release notes for RemexHtml upgrade
Kunal Mehta [Sun, 21 Oct 2018 18:48:59 +0000 (21 11:48 -0700)]
Bump release notes for RemexHtml upgrade

Change-Id: I43190e3dc8c74da4e226e173941fb6bdce454a02
(cherry picked from commit 162caf26c15312e8fcd0201746b8cfa758de5f0c)

3 years agoMerge "Update wikimedia/base-convert to 2.0.0" into REL1_32
jenkins-bot [Mon, 22 Oct 2018 21:35:16 +0000 (22 21:35 +0000)]
Merge "Update wikimedia/base-convert to 2.0.0" into REL1_32

3 years agoUpdate git submodules
Kunal Mehta [Mon, 22 Oct 2018 18:17:22 +0000 (22 11:17 -0700)]
Update git submodules

* Update vendor from branch 'REL1_32'
  to 8d22dcf1641ef2390dc2522edcfbcb70e09ecc0f
  - Update wikimedia/base-convert to 2.0.0

    Bug: T194052
    Change-Id: I4de5c0ab827c96e2cef4e0b2cd7d10a109393668
    (cherry picked from commit 2f3707a143c1ef3bbe69d57fa724ae9dc6541d0e)

3 years agoUpdate wikimedia/base-convert to 2.0.0
Kunal Mehta [Mon, 22 Oct 2018 18:17:40 +0000 (22 11:17 -0700)]
Update wikimedia/base-convert to 2.0.0

The breaking change is dropping PHP 5 support.

Bug: T194052
Depends-On: I4de5c0ab827c96e2cef4e0b2cd7d10a109393668
Change-Id: If39ea5274bfa3c9b0ce18f9a43a27445a90ea3fc
(cherry picked from commit bb2d81c3a47e1fb1266b6f0352bb89b786ea9235)

3 years agoRename WebInstallerOutput::addWikiTextInterface
C. Scott Ananian [Mon, 22 Oct 2018 03:00:14 +0000 (21 23:00 -0400)]
Rename WebInstallerOutput::addWikiTextInterface

Follow up to I89f3398cffa771afcd5a33cfd11eb8510af3e7f7: this patch
was intended to mirror a new method added to OutputPage in
Ia58910164baaca608cea3b24333b7d13ed773339 but the bikeshed was painted
a slightly different color before the OutputPage patch was merged, and
somehow this patch wasn't changed to match.  The `addWikiTextInterface`
name was never included in a released MW version, so we don't need to
deprecate it, just fix it.

Change-Id: I636cb0ea0f9631c4c5e2bc118f479aec76d2b231
(cherry picked from commit b3141dac431989a7e599904d2924bb1847a19528)

3 years agoRCFilters: Fix highlight circles for unseen changes
Roan Kattouw [Fri, 19 Oct 2018 20:38:44 +0000 (19 13:38 -0700)]
RCFilters: Fix highlight circles for unseen changes

These are supposed to be unfilled, but the CSS wasn't being applied
because it didn't have -color in the class name. Put it back into the
&-color block where it belongs.

Bug: T207472
Change-Id: Ic517b9a1a0e8e95015f5b2bd3517c36bff3b20e8
Follows-Up: I76fec57ff237ba02afefcea28916d8348bac9b0e
(cherry picked from commit 49e76f6e601374f3113df40fe942d94f74d786c2)

3 years agoRCFilters: Fix completely broken highlight circles
Roan Kattouw [Fri, 19 Oct 2018 19:18:35 +0000 (19 12:18 -0700)]
RCFilters: Fix completely broken highlight circles

- Correct highlights class name (mw-rcfilters-ui-highlights, not
  mw-rcfilters-ui-changesListWrapperWidget-highlights)
- Remove -circle class suffix that the circles don't actually have
- Go back to using float: right; instead of text-align: right;
  (you can't use text-align for things that aren't inline)
- For seen/unseen watched items, apply circle mixin to the actual
  circles themselves, not their parents

Bug: T207472
Change-Id: Iade1af4299826a4e8a2108425ace9a406f0aa8cb
Follows-Up: I76fec57ff237ba02afefcea28916d8348bac9b0e
(cherry picked from commit 970eda65db74071290d8517b9bbc15fd85ddde09)

3 years agoMerge "Upgrade wikimedia/remex-html to 2.0.1" into REL1_32
jenkins-bot [Sun, 21 Oct 2018 18:40:16 +0000 (21 18:40 +0000)]
Merge "Upgrade wikimedia/remex-html to 2.0.1" into REL1_32

3 years agoUpdate git submodules
Kunal Mehta [Sun, 21 Oct 2018 05:10:45 +0000 (20 22:10 -0700)]
Update git submodules

* Update vendor from branch 'REL1_32'
  to 2fdf2b5daab8e3812a968f075cc635d7d167b5d7
  - Upgrade wikimedia/remex-html to 2.0.1

    Bug: T207088
    Change-Id: Id4bbbdb68678c37ec4aa84d519516199bb800393
    (cherry picked from commit 48f274d9cc6b2e8d4961c831e1cc81c4edba6689)

3 years agoUpgrade wikimedia/remex-html to 2.0.1
Kunal Mehta [Sun, 21 Oct 2018 05:12:14 +0000 (20 22:12 -0700)]
Upgrade wikimedia/remex-html to 2.0.1

Bug: T207088
Depends-On: Id4bbbdb68678c37ec4aa84d519516199bb800393
Change-Id: Ia5822f5f283f5d935c78402ce71e2d010e9a7a91
(cherry picked from commit a404d87418bb332deab92fa7189b999d1c0c410c)

3 years agoMerge "SECURITY: Don't allow loading unprotected JS files" into REL1_32
jenkins-bot [Sun, 21 Oct 2018 16:59:40 +0000 (21 16:59 +0000)]
Merge "SECURITY: Don't allow loading unprotected JS files" into REL1_32

3 years agoMerge "installer: Don't link to the obsolete "Extension Matrix" page" into REL1_32
jenkins-bot [Sun, 21 Oct 2018 16:16:38 +0000 (21 16:16 +0000)]
Merge "installer: Don't link to the obsolete "Extension Matrix" page" into REL1_32

3 years agoSECURITY: Don't allow loading unprotected JS files
Brian Wolff [Thu, 27 Sep 2018 11:42:37 +0000 (27 11:42 +0000)]
SECURITY: Don't allow loading unprotected JS files

This is meant to protect against malicious people while avoiding
annoying good users as much as possible. We may want to restrict
this further in the future, but that's something that can be discussed
in the normal way.

Bug: T194204
Bug: T113042
Bug: T112937
Change-Id: I27e049bae78b5c0f63b10f454b740cb1dc394813

3 years agoMerge "Database: Allow selectFieldValues() to accept SQL fragments" into REL1_32
jenkins-bot [Sun, 21 Oct 2018 15:59:23 +0000 (21 15:59 +0000)]
Merge "Database: Allow selectFieldValues() to accept SQL fragments" into REL1_32

3 years agoMerge "rdbms: re-add DB domain sanity checks to LoadBalancer" into REL1_32
jenkins-bot [Sun, 21 Oct 2018 15:45:31 +0000 (21 15:45 +0000)]
Merge "rdbms: re-add DB domain sanity checks to LoadBalancer" into REL1_32

3 years agoMerge "Don't pass a MailAddress pass the email to mail()" into REL1_32
jenkins-bot [Sun, 21 Oct 2018 15:45:26 +0000 (21 15:45 +0000)]
Merge "Don't pass a MailAddress pass the email to mail()" into REL1_32

3 years agoinstaller: Don't link to the obsolete "Extension Matrix" page
Zoranzoki21 [Sat, 29 Sep 2018 00:06:23 +0000 (29 03:06 +0300)]
installer: Don't link to the obsolete "Extension Matrix" page

Bug: T205765
Change-Id: Id1ba965c7c06ce03611ba745421dc982f5393f8c
(cherry picked from commit 8b7b5f04b7c84ffd2cda3aae06513a8e4fca6128)

3 years agoFix comment handling on image upload or deletion
Brad Jorsch [Thu, 18 Oct 2018 21:12:44 +0000 (18 17:12 -0400)]
Fix comment handling on image upload or deletion

Before Iab5f5215, the call to CommentStore::insertWithTempTable() also
happened to populate image_comment_temp for the later call to
insertSelect() when moving rows from the image table to oldimage or
filearchive. There was nothing in the image table itself that needed
updating.

In that change those calls were changed to CommentStore::insert(), but
it was missed that in that case we do have to update the image table
itself.

Bug: T207419
Change-Id: I26c417c9ab8a9160a7c7ec548ffdfabf17f01980

3 years agoDatabase: Allow selectFieldValues() to accept SQL fragments
Brad Jorsch [Wed, 17 Oct 2018 15:26:51 +0000 (17 11:26 -0400)]
Database: Allow selectFieldValues() to accept SQL fragments

The documentation says "This must be a valid SQL fragment", but as
written it breaks if given anything other than a field name. It's easy
enough to fix by adding an alias to the internal select() call.

Bug: T201781
Change-Id: I76428af6d3aadc266254fdb24109a0ac2db3761f
(cherry picked from commit c5a5b022400318e52638a4d34369ddbb74d7a21b)

3 years agoMerge "Add COALESCE for image deletion and imgcomment_description_id" into REL1_32
jenkins-bot [Sat, 20 Oct 2018 22:49:15 +0000 (20 22:49 +0000)]
Merge "Add COALESCE for image deletion and imgcomment_description_id" into REL1_32

3 years agoDon't pass a MailAddress pass the email to mail()
Reedy [Sat, 20 Oct 2018 12:37:15 +0000 (20 13:37 +0100)]
Don't pass a MailAddress pass the email to mail()

Bug: T207541
Change-Id: I1516023907e9773cb093010c6b67279f695abb1a
(cherry picked from commit c57aacb782f5ce5e53253192a53d736ece300d3c)

3 years agoInclude IP address in "Login for $1 succeeded" log entry
Kunal Mehta [Sat, 20 Oct 2018 12:35:22 +0000 (20 05:35 -0700)]
Include IP address in "Login for $1 succeeded" log entry

Bug: T207540
Change-Id: Iab4f2f2ddc8e64ead2f33356d03fa7beed399415

3 years agoAdd COALESCE for image deletion and imgcomment_description_id
Brad Jorsch [Thu, 18 Oct 2018 20:51:42 +0000 (18 16:51 -0400)]
Add COALESCE for image deletion and imgcomment_description_id

I have no idea why this suddenly started raising an error rather than it
doing so since February (I0dd7258fe). But this should fix it.

Bug: T207419
Change-Id: Id97e1c7c2655d90928c777bc3377e5ea23f49f6b
(cherry picked from commit b53f0c278f6cb84c3cbbcb3100231c8c7e2fd870)

3 years agoAdd OutputPage::wrapWikiTextAsInterface() to safely wrap wikitext
C. Scott Ananian [Thu, 27 Sep 2018 15:04:45 +0000 (27 11:04 -0400)]
Add OutputPage::wrapWikiTextAsInterface() to safely wrap wikitext

This patch introduces a new method,
OutputPage::wrapWikiTextAsInterface(), which wraps the result of
OutputPage::addWikiTextAsInterface() in a tidy and robust way that
won't break if the wrapped message contains double newlines, extra
</div>, or other nasties.

This replaces a common unsafe pattern:
  $output->addWikiText( '<div class="..."' .... '</div>' );

Bug: T205624
Change-Id: I1040c7cf0ec1f5c4bef7c06d4486f50d85f2dc0f
(cherry picked from commit d404b76510057c3fc4151f51bf6630ae27f6a57b)

3 years agordbms: re-add DB domain sanity checks to LoadBalancer
Aaron Schulz [Sat, 13 Oct 2018 16:14:20 +0000 (13 16:14 +0000)]
rdbms: re-add DB domain sanity checks to LoadBalancer

Also clean up empty schema handling in DatabaseDomain

This reverts commit f23ac02f4fcf156767df66a5df2fa407310fe1d2.

Bug: T193565
Change-Id: I95fde5c069f180ca888a023fade25ec81b846d44

3 years agoINSTALL, UPGRADE: Re-wrap to 80 chars and enforce
James D. Forrester [Wed, 13 Jun 2018 19:04:51 +0000 (13 12:04 -0700)]
INSTALL, UPGRADE: Re-wrap to 80 chars and enforce

Change-Id: Idabcc4db7a0b25448e7ad30641763e2b3e1a3160
(cherry picked from commit a47aec961e329fb8ae37d6c6646d7e82b101c191)

3 years agoRELEASE-NOTES-1.32: Add entries for all changes to DefaultSettings.php
James D. Forrester [Thu, 4 Oct 2018 00:51:15 +0000 (3 17:51 -0700)]
RELEASE-NOTES-1.32: Add entries for all changes to DefaultSettings.php

Change-Id: Iae1122ef69940ca208d30dcd9554af8b7f60ac74
(cherry picked from commit c1eb51dcd915f108f153d32b5d4153049a0c6d28)

3 years agoMerge "Follow-up 3481e3b2: Drop disablability of ExpiryInputWidget before 1.32 is...
jenkins-bot [Wed, 17 Oct 2018 02:01:52 +0000 (17 02:01 +0000)]
Merge "Follow-up 3481e3b2: Drop disablability of ExpiryInputWidget before 1.32 is cut" into REL1_32

3 years agoFollow-up 3481e3b2: Drop disablability of ExpiryInputWidget before 1.32 is cut
James D. Forrester [Thu, 4 Oct 2018 00:45:29 +0000 (3 17:45 -0700)]
Follow-up 3481e3b2: Drop disablability of ExpiryInputWidget before 1.32 is cut

No longer used anywhere(?); we'd rather not have to explain the temporary
variable in the MediaWiki 1.32.0 release notes if we can instead just not ship
it.

Bug: T192620
Change-Id: Icfb82f228512ed45f1a27ce3e565fbc5fc09f39c
(cherry picked from commit b162e8ae7896cdabc3acccbe0203d36184e14ecf)

3 years agoCreating new REL1_32 branch
Mukunda Modell [Tue, 16 Oct 2018 21:59:33 +0000 (16 16:59 -0500)]
Creating new REL1_32 branch

Change-Id: I6dd81024c8b888f8bd4cd2f30cdad1c90ed62229

3 years agomessagecache: check overridable message array in getMsgFromNamespace()
Aaron Schulz [Mon, 15 Oct 2018 15:08:24 +0000 (15 08:08 -0700)]
messagecache: check overridable message array in getMsgFromNamespace()

Follow up to a3d6c1411dad.

This avoids extra queries for messages that have a software defined value.

Bug: T193271
Change-Id: I25aa0e27200a0b417721cf1fbd34a82095405b89

3 years agoMerge "[Korean] Add 2 additional bookstoreList"
jenkins-bot [Tue, 16 Oct 2018 20:03:48 +0000 (16 20:03 +0000)]
Merge "[Korean] Add 2 additional bookstoreList"

3 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 16 Oct 2018 19:55:58 +0000 (16 21:55 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I44bc61d6e2147602329eeface6892e78db0388b2