lhc/web/wiklou.git
4 years agoMerge "Rewrite pref cleanup script"
jenkins-bot [Wed, 31 Jan 2018 18:47:59 +0000 (18:47 +0000)]
Merge "Rewrite pref cleanup script"

4 years agoMerge "jquery.textSelection: Remove code supporting IE 6 selection APIs"
jenkins-bot [Wed, 31 Jan 2018 15:53:51 +0000 (15:53 +0000)]
Merge "jquery.textSelection: Remove code supporting IE 6 selection APIs"

4 years agoMerge "jquery.textSelection: Remove final remnants of WikiEditor iframe support"
jenkins-bot [Wed, 31 Jan 2018 15:53:28 +0000 (15:53 +0000)]
Merge "jquery.textSelection: Remove final remnants of WikiEditor iframe support"

4 years agoMerge "Move @group and @covers tags in tests close to class"
jenkins-bot [Wed, 31 Jan 2018 14:51:26 +0000 (14:51 +0000)]
Merge "Move @group and @covers tags in tests close to class"

4 years agoMerge "resourceloader: Add minified version of mw.loader.implement() wrapper"
jenkins-bot [Wed, 31 Jan 2018 13:40:37 +0000 (13:40 +0000)]
Merge "resourceloader: Add minified version of mw.loader.implement() wrapper"

4 years agojquery.textSelection: Remove code supporting IE 6 selection APIs
Bartosz Dziewoński [Wed, 31 Jan 2018 05:44:53 +0000 (06:44 +0100)]
jquery.textSelection: Remove code supporting IE 6 selection APIs

Removing all the code that uses the document.selection and
document.body.createTextRange() APIs, or that only runs if
these APIs are present (workarounds for old IE bugs).

These APIs were supported by Internet Explorer up to version 9
and by Opera up to version 10.5. More recent versions of both
browsers only support the standard selection APIs.

Bug: T186005
Change-Id: I32dc5a16b03cf1c2ea44f6c7361447607ccc7e62

4 years agojquery.textSelection: Remove final remnants of WikiEditor iframe support
Bartosz Dziewoński [Wed, 31 Jan 2018 05:37:54 +0000 (06:37 +0100)]
jquery.textSelection: Remove final remnants of WikiEditor iframe support

After WikiEditor's experimental iframe mode was removed in
952d6b9d8fc1d4ac606b6f8d0a3341ba7ec27e02, the code here was mostly
removed in 62b4198859e4ac7cf41775dc8bc943272e3ddfc3, but this little
stub remained to support CodeEditor (it piggy-backed on that feature
to support textSelection() overrides). That was also cleaned up
afterwards in 37228b257896e0a36816a61543ed5809e8ad6596, but everyone
forgot about this little remnant.

This code was not doing anything, as nothing sets the 'context.$iframe'
property anymore, in any extension.

Change-Id: I0ffe2405df7d6aaecc51b06ba6c7fea5fd8380b4

4 years agoMerge "rdbms: make affectedRows() work more consistently"
jenkins-bot [Wed, 31 Jan 2018 04:48:32 +0000 (04:48 +0000)]
Merge "rdbms: make affectedRows() work more consistently"

4 years agoMerge "rdbms: avoid pointless "SHOW SLAVE STATUS" calls in masterPosWait()"
jenkins-bot [Wed, 31 Jan 2018 04:43:38 +0000 (04:43 +0000)]
Merge "rdbms: avoid pointless "SHOW SLAVE STATUS" calls in masterPosWait()"

4 years agordbms: make affectedRows() work more consistently
Aaron Schulz [Sun, 28 Jan 2018 14:10:39 +0000 (06:10 -0800)]
rdbms: make affectedRows() work more consistently

* Update replace()/upsert() to combine the affected row
  count for the non-native case
* Also make replace() atomic in the non-native case,
  similar to how upsert() already works

Change-Id: I6c9bcba54eca6bcf4a93a9b230aaedf7f36aa877

4 years agoMerge "Revert "Remove workaround for comparing database domain IDs.""
jenkins-bot [Wed, 31 Jan 2018 03:13:46 +0000 (03:13 +0000)]
Merge "Revert "Remove workaround for comparing database domain IDs.""

4 years agordbms: avoid pointless "SHOW SLAVE STATUS" calls in masterPosWait()
Aaron Schulz [Tue, 30 Jan 2018 12:39:36 +0000 (04:39 -0800)]
rdbms: avoid pointless "SHOW SLAVE STATUS" calls in masterPosWait()

This code branch is not useful in the GTID case

Change-Id: Ia112c9b4b9c1f1297cc4eaac7f4a5a1ca882f02e

4 years agoMerge "rdbms: clean up non-native Database::replace() code"
jenkins-bot [Tue, 30 Jan 2018 23:53:30 +0000 (23:53 +0000)]
Merge "rdbms: clean up non-native Database::replace() code"

4 years agoMerge "Fix $wgSharedDB with sqlite"
jenkins-bot [Tue, 30 Jan 2018 22:20:53 +0000 (22:20 +0000)]
Merge "Fix $wgSharedDB with sqlite"

4 years agoMerge "Fix issue when modifying groups in Special:Userrights"
jenkins-bot [Tue, 30 Jan 2018 21:00:56 +0000 (21:00 +0000)]
Merge "Fix issue when modifying groups in Special:Userrights"

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 30 Jan 2018 20:57:21 +0000 (21:57 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ibfb41f389c5b2c511d9372a423e2caa5cc844b37

4 years agoFix issue when modifying groups in Special:Userrights
Ryan Schmidt [Sun, 23 Jul 2017 04:19:49 +0000 (21:19 -0700)]
Fix issue when modifying groups in Special:Userrights

If a user has permission to remove a group but not add it, they cannot
manipulate other groups on a user who currently has the un-addable
group. An error is shown that the expiry is invalid and prevents the
save. To fix this, add a hidden input that is hardcoded to the existing
expiration (either 'existing' if it is a temporary assignment, or
'infinite' if the assignment does not expire), so that the validation
succeeds. Validation of this input is already taken care of in
execute(), so it is not possible for a user to extend an expiration this
way if they do not have the necessary privileges to do so.

Bug: T171345
Change-Id: I9268c05d6c491eab45147f8a9941ad4d4e1f563f

4 years agoRewrite pref cleanup script
Chad Horohoe [Tue, 25 Jul 2017 20:32:31 +0000 (13:32 -0700)]
Rewrite pref cleanup script

- Keep the current hidden pref cleanup stuff, that's not harmful
  and marginally useful
- Drop preferences we dunno wtf they're about. Cuz they're probably
  deprecated or otherwise unused
- Normalize preferences into accepted value ranges. This part is kinda
  hard and I haven't figured it out, so slap a TODO

More to come, stay tuned!

Change-Id: I70047adba0034136d107ce7534294cc6fa3c1860

4 years agoFix $wgSharedDB with sqlite
Ryan Schmidt [Tue, 2 Jan 2018 17:56:32 +0000 (11:56 -0600)]
Fix $wgSharedDB with sqlite

At the time of the constructor, tableAliases will always be an empty
array. As such, the ATTACH command is never run for shared dbs, and we
get query errors when later trying to reference them. This changes it so
that the shared db is attached whenever the table aliases are finally
set.

Since table aliases may be set multiple times, the list of already
attached dbs was moved into class scope so that subsequent calls to set
the aliases do not result in query errors.

Bug: T181962
Change-Id: Ia654e996f54077bc3749b884a528e121ab25a2d2

4 years agoMerge "parser: Replace Sanitizer::armorLinksCallback() with a closure"
jenkins-bot [Tue, 30 Jan 2018 20:02:16 +0000 (20:02 +0000)]
Merge "parser: Replace Sanitizer::armorLinksCallback() with a closure"

4 years agoparser: Replace Sanitizer::armorLinksCallback() with a closure
Max Semenik [Mon, 13 Nov 2017 23:48:03 +0000 (15:48 -0800)]
parser: Replace Sanitizer::armorLinksCallback() with a closure

Used only once, small enough. Perfect candidate to not be exposed
even as a private function.

Change-Id: Ic020a596f709cb4f69c48ffe8138f9023a5c4062

4 years agoMerge "mw.Feedback: If the message is posted remotely, link the title correctly"
jenkins-bot [Tue, 30 Jan 2018 19:51:00 +0000 (19:51 +0000)]
Merge "mw.Feedback: If the message is posted remotely, link the title correctly"

4 years agoMerge "postEdit: Show a different success messsage on publish vs. save wikis"
jenkins-bot [Tue, 30 Jan 2018 19:44:06 +0000 (19:44 +0000)]
Merge "postEdit: Show a different success messsage on publish vs. save wikis"

4 years agoMerge "objectcache: add some WANObjectCache comments to set() and delete()"
jenkins-bot [Tue, 30 Jan 2018 19:35:13 +0000 (19:35 +0000)]
Merge "objectcache: add some WANObjectCache comments to set() and delete()"

4 years agopostEdit: Show a different success messsage on publish vs. save wikis
James D. Forrester [Tue, 18 Apr 2017 15:59:08 +0000 (08:59 -0700)]
postEdit: Show a different success messsage on publish vs. save wikis

Bug: T183901
Change-Id: I065f733bd8b27bda68023cd1b718e257fd135aa2

4 years agoresourceloader: Move FILTER_NOMIN annotation to the beginning of output
Bartosz Dziewoński [Tue, 30 Jan 2018 11:12:46 +0000 (12:12 +0100)]
resourceloader: Move FILTER_NOMIN annotation to the beginning of output

This allows ResourceLoader::filter() to handle this case slightly
faster, since it searches for this annotation from the beginning.
In practice this is a negligible performance optimization, but let's
set a good example for the future.

Also tweak the comments and whitespace:
* Move comment about the FILTER_NOMIN from doc comment to code comment,
  it's an implementation detail and not meant for public documentation
* Remove duplicated documentation from the parent class
* Change whitespace to be identical in both cases

Change-Id: I624914ff28d903027ba58710708ccc3c66af9e24

4 years agoRevert "Remove workaround for comparing database domain IDs."
Addshore [Tue, 30 Jan 2018 17:22:50 +0000 (17:22 +0000)]
Revert "Remove workaround for comparing database domain IDs."

This seems to have broken stuff, see failing tests on:
https://gerrit.wikimedia.org/r/#/c/406302/

Could not insert main page: RevisionStore for  cannot
be used with a DB connection for jenkins_u0_mw

This reverts commit d2a4d614fce09cdf9dfc137f8507b504e09c0ccc.

Bug: T186017
Change-Id: Ic3de8e856d7d6b224b02816f2c5a1aa0648cd184

4 years agoMerge "SpecialExpandTemplates: Remove leftover 'mw-ui-input-inline' class"
jenkins-bot [Tue, 30 Jan 2018 17:43:13 +0000 (17:43 +0000)]
Merge "SpecialExpandTemplates: Remove leftover 'mw-ui-input-inline' class"

4 years agoMerge "Remove unused method parameters from TestBagOStuff"
jenkins-bot [Tue, 30 Jan 2018 16:24:55 +0000 (16:24 +0000)]
Merge "Remove unused method parameters from TestBagOStuff"

4 years agoRemove unused method parameters from TestBagOStuff
Thiemo Mättig [Wed, 10 Jan 2018 13:32:56 +0000 (14:32 +0100)]
Remove unused method parameters from TestBagOStuff

This is a test mock exclusively used in tests. All code I'm removing here
is unused and neither needed nor covered by any test.

Change-Id: Ifd010c49973460f6fbb2cd83f8fd63488f5fd291

4 years agoSpecialExpandTemplates: Remove leftover 'mw-ui-input-inline' class
Bartosz Dziewoński [Tue, 30 Jan 2018 14:29:44 +0000 (15:29 +0100)]
SpecialExpandTemplates: Remove leftover 'mw-ui-input-inline' class

mediawiki.ui is not loaded on this page anymore after the OOUI
conversion. However, if some extension etc. were to load it, this
field (page title) would have the styles applies unexpectedly,
and it looks rather silly with them (very narrow).

Change-Id: I5cfe71897f435a514c6971b3a0ff7521e422324c

4 years agojquery.textSelection: Remove outdated FIXME comments
Bartosz Dziewoński [Tue, 30 Jan 2018 09:26:15 +0000 (10:26 +0100)]
jquery.textSelection: Remove outdated FIXME comments

These are from 2010 or earlier; they blame to 32377424b94 / rSVN72349,
which is a huge SVN branch merge and I'm not going to dig past that.

To be honest I don't really understand them (perhaps some context has
been lost over the years), but their main point is "we may not need
these functions", to which I say we definitely need them because
they've been a public API for over 7 years now.

Change-Id: I43a5453003e8d64d00323eb973629a96b6b386ab

4 years agoMerge "Remove workaround for comparing database domain IDs."
jenkins-bot [Tue, 30 Jan 2018 05:55:38 +0000 (05:55 +0000)]
Merge "Remove workaround for comparing database domain IDs."

4 years agoRemove workaround for comparing database domain IDs.
daniel [Tue, 30 Jan 2018 03:43:11 +0000 (19:43 -0800)]
Remove workaround for comparing database domain IDs.

Change-Id: I240d68eddec871794ed98b7ce67773114ee73ff7

4 years agordbms: clean up non-native Database::replace() code
Aaron Schulz [Sun, 14 Jan 2018 03:57:51 +0000 (19:57 -0800)]
rdbms: clean up non-native Database::replace() code

* Make sure all unique keys specified have all their values
  provided to avoid large bogus DELETEs. Do not ignore them
  in such cases either, as that would cause inconsistencies
  between the native and non-native case. Use an exception.
* Make ChangeTags caller clearer that the list of indexes
  is not a list of fields for a single index. Also, avoid
  mentioning indexes for values not defined in the new
  records, as this causes errors or inconsistencies with
  the native vs non-native case.
* This also fixes the "Undefined index: ts_log_id" error
  when running unit tests on postgres.

Change-Id: I30263df22066bd6d4836202b1bcad5d1aa1e7383

4 years agoMerge "cleanupTitles: Don't add 'Broken/' prefix if the title is valid without it"
jenkins-bot [Tue, 30 Jan 2018 02:21:49 +0000 (02:21 +0000)]
Merge "cleanupTitles: Don't add 'Broken/' prefix if the title is valid without it"

4 years agoMerge "Use ::class to resolve class names in includes files"
jenkins-bot [Tue, 30 Jan 2018 02:16:28 +0000 (02:16 +0000)]
Merge "Use ::class to resolve class names in includes files"

4 years agoMerge ".mailmap: Fix my name to use the form used elsewhere"
jenkins-bot [Tue, 30 Jan 2018 02:09:02 +0000 (02:09 +0000)]
Merge ".mailmap: Fix my name to use the form used elsewhere"

4 years agoMerge "Make DatabaseMysqlBase::insertSelect() safer to use"
jenkins-bot [Tue, 30 Jan 2018 01:57:26 +0000 (01:57 +0000)]
Merge "Make DatabaseMysqlBase::insertSelect() safer to use"

4 years agoMerge "Hide link to ApiSandbox in ApiSandbox"
jenkins-bot [Tue, 30 Jan 2018 01:57:21 +0000 (01:57 +0000)]
Merge "Hide link to ApiSandbox in ApiSandbox"

4 years agoobjectcache: add some WANObjectCache comments to set() and delete()
Aaron Schulz [Tue, 30 Jan 2018 01:29:20 +0000 (17:29 -0800)]
objectcache: add some WANObjectCache comments to set() and delete()

Change-Id: I527f1244c5c7cece888ace25e7a01653cf2b9542

4 years agoresourceloader: Add minified version of mw.loader.implement() wrapper
Timo Tijhof [Mon, 29 Jan 2018 23:30:23 +0000 (15:30 -0800)]
resourceloader: Add minified version of mw.loader.implement() wrapper

Follows-up b7eb243d92, which changed minification to be per-module,
but had as result that the little implement() wrapper is not always
minified, e.g. when outputting modules that have minification disabled
(such as 'user.tokens' and 'user.options').

Rather than introducing some complex minification cache for the
wrapper (with a find and replace for the variable content), simply
add a hardcoded minified version of the wrapper.

Change-Id: Iccf0d3408beab4387031cc55689394ff67e1e64b

4 years agoresourceloader: Disable minify for embedded 'user.options' module
Timo Tijhof [Mon, 29 Jan 2018 23:14:19 +0000 (15:14 -0800)]
resourceloader: Disable minify for embedded 'user.options' module

Follows-up 6fa489392815 (T84960), which disabled minification
for 'user.tokens'.

In 2014 'user.tokens' module was changed to change tokens on every page view,
even for the same user within a short period of time. This led to a huge
minify-cache growth, and we subsequently disabled caching for its minification
result.

Since then, we have also done:
* Disable minification for 'user.tokens' more generally, given
  that it's just a simple JSON blob and we already pass down the 'debug' mode
  flag down to the creation of that blob, so there's virtually nothing to left
  to minify.
* Disable minification for mw.config.set(). Config values are exported by
  ResourceLoaderClientHtml and not part of any module. Given that since 2015
  we minify per-module and not per-response (b7eb243d92) that means config
  data naturally doesn't go through minification, which is good, because
  just like for 'user.tokens', the config data is JSON which is already created
  without whitespace. Minification would be pointless.

However, 'user.options' is still being minified and cached, and makes up about
25% of the 'resourceloader:minify-js.*' keys in APC on Wikimedia servers.

Unlike 'user.tokens', the minify cache for 'user.options' does actually get
used by subsequent page views from the same user (unless preferences changed).

However, it isn't useful because it's plain JSON and already compressed enough.
Besides, the blob is so small that it's not worth the overhead of cache-checking.
If we would want to minify it, I'd recommend we re-minify each view without cache.

Change-Id: Ic0ffb0e23df9b40e2c1283c89bd876a5c0555951

4 years agoMerge "Revert "selenium: add new message banner test to user spec""
jenkins-bot [Mon, 29 Jan 2018 20:55:23 +0000 (20:55 +0000)]
Merge "Revert "selenium: add new message banner test to user spec""

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 29 Jan 2018 20:54:35 +0000 (21:54 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ia30ac7ea1fbab5248058c09f793c583f73dc27c7

4 years agoRevert "selenium: add new message banner test to user spec"
Jdlrobson [Mon, 29 Jan 2018 19:47:07 +0000 (19:47 +0000)]
Revert "selenium: add new message banner test to user spec"

This reverts commit 6ca3e221d1b907f55462394f910f283bb3627cc9.
This is breaking CI for the Minerva skin and Echo as Echo changes how
this interaction works. When the browser test tries to locate the
div.usermessage it has moved so fails.

This test needs to be rewritten to take this into account.

On a side note, given usermessage is generated by all skins (and not
in core) there is a big argument to be made that this shouldn't be in
core but in the individual skins. MinervaNeue the mobile skin notably
does not use this class so this test would always fail on a mediawiki
instance which only uses the Minerva skin.

Bug: T185928
Change-Id: I43b6cf328aaf4a4fded0bb9746716c4cc9d8f364

4 years agoMerge "benchmarks: Add benchmarkSanitizer.php"
jenkins-bot [Mon, 29 Jan 2018 19:14:10 +0000 (19:14 +0000)]
Merge "benchmarks: Add benchmarkSanitizer.php"

4 years agoMerge "benchmarks: Add rate per second and standard deviation to output"
jenkins-bot [Mon, 29 Jan 2018 19:14:07 +0000 (19:14 +0000)]
Merge "benchmarks: Add rate per second and standard deviation to output"

4 years agoRCFilters: replace usages of deprecated getSelectedItem
Stephane Bisson [Mon, 29 Jan 2018 16:59:55 +0000 (11:59 -0500)]
RCFilters: replace usages of deprecated getSelectedItem

Use findSelectedItem instead.

Change-Id: Id13a1a94a2808910f3a2f2e434551229016ac865

4 years ago.mailmap: Fix my name to use the form used elsewhere
James D. Forrester [Mon, 29 Jan 2018 15:57:02 +0000 (07:57 -0800)]
.mailmap: Fix my name to use the form used elsewhere

Change-Id: I0468a185d19cade3f2c51947190111a66cccc129

4 years agoMerge "API: Allow to pass whitespaces in MultiValue"
jenkins-bot [Mon, 29 Jan 2018 15:31:43 +0000 (15:31 +0000)]
Merge "API: Allow to pass whitespaces in MultiValue"

4 years agoHide link to ApiSandbox in ApiSandbox
Brad Jorsch [Mon, 29 Jan 2018 14:31:16 +0000 (09:31 -0500)]
Hide link to ApiSandbox in ApiSandbox

It's a bit redundant. Wrap the paragraph with the link in an appropriate
CSS class, and add a rule to mediawiki.special.apisandbox.css to hide it
when inside ApiSandbox.

Bug: T185855
Change-Id: I118e535420e3395268fe99aa0f69f2b032340d53

4 years agoMerge "benchmarks: Simplify benchmarkLruHash.php by using a --method option"
jenkins-bot [Mon, 29 Jan 2018 12:53:22 +0000 (12:53 +0000)]
Merge "benchmarks: Simplify benchmarkLruHash.php by using a --method option"

4 years agoMerge "selenium: add new message banner test to user spec"
jenkins-bot [Mon, 29 Jan 2018 11:53:46 +0000 (11:53 +0000)]
Merge "selenium: add new message banner test to user spec"

4 years agobenchmarks: Add benchmarkSanitizer.php
Timo Tijhof [Sat, 27 Jan 2018 17:46:12 +0000 (09:46 -0800)]
benchmarks: Add benchmarkSanitizer.php

Covering the following common methods:

* validateEmail (input=valid, input=invalid)
* encodeAttribute (input=simple, input=special)
* safeEncodeAttribute (input=simple, input=special)
* removeHTMLtags (input=small, input=large)
* stripAllTags (input=small, input=large)

Change-Id: I3c645e960607ab247bd30324a2e70eb5fbcc5d6e

4 years agobenchmarks: Add rate per second and standard deviation to output
Timo Tijhof [Sun, 28 Jan 2018 21:46:32 +0000 (13:46 -0800)]
benchmarks: Add rate per second and standard deviation to output

* Convert to using RunningStat to ensure mostly constant memory
  usage, instead of storing each result.
* Remove 'median' (no longer possible with this setup).
* Remove 'min' from output.

Change-Id: I6efbc500181eb502c1800165870eee81dbc418a7

4 years agobenchmarks: Simplify benchmarkLruHash.php by using a --method option
Timo Tijhof [Sat, 27 Jan 2018 17:06:12 +0000 (09:06 -0800)]
benchmarks: Simplify benchmarkLruHash.php by using a --method option

Easier to extend.

Change-Id: Ib9c6b3d10caad7de138d8bafd2f0e6e9bbe6a8cc

4 years agoAPI: Allow to pass whitespaces in MultiValue
Fomafix [Sun, 21 Jan 2018 20:58:59 +0000 (21:58 +0100)]
API: Allow to pass whitespaces in MultiValue

This allows to response with an invalidreason instead silently ignore
the parameter.

Example request: api.php?format=json&action=query&titles=%20

Response before this change:
{
  "batchcomplete": ""
}

Response with this change:
{
  "batchcomplete": "",
  "query": {
    "pages": {
      "-1": {
        "title": " ",
        "invalidreason": "The requested page title is empty or contains only the name of a namespace.",
        "invalid": ""
      }
    }
  }
}

Bug: T185846
Change-Id: I6fdaf32792a0e6e37b08176f975c10607093351b

4 years agoImprove MediaWiki's lock file error message when uploading files
Zoranzoki21 [Sun, 28 Jan 2018 13:56:02 +0000 (13:56 +0000)]
Improve MediaWiki's lock file error message when uploading files

Bug: T181453
Change-Id: I1e78d5eadd19c5cf203b8f4bbc8ab6d533307a15

4 years agoMove @group and @covers tags in tests close to class
Umherirrender [Sun, 28 Jan 2018 12:30:07 +0000 (13:30 +0100)]
Move @group and @covers tags in tests close to class

For @group and @covers tags there should be no newline between the
comment and the class

Change-Id: I7277df13a332cf4d74ffdd8748e3fbdc259610dc

4 years agoUpdate CREDITS file to include new contributors
Alangi Derick [Fri, 19 Jan 2018 12:33:36 +0000 (13:33 +0100)]
Update CREDITS file to include new contributors

Ran the updateCredits.php script to include new contributors of
MW and its extensions into the CREDITS file after a while. Keeping
the contributor list updated is useful.

Change-Id: I491c35285b562e1792715b83c674b8f1173add77

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 27 Jan 2018 21:04:00 +0000 (22:04 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I2839c3d3bdb2b229e2cb8226af32964cfc2669ab

4 years agoUse ::class to resolve class names in includes files
Umherirrender [Sat, 13 Jan 2018 00:02:09 +0000 (01:02 +0100)]
Use ::class to resolve class names in includes files

This helps to find renamed or misspelled classes earlier.
Phan will check the class names

Change-Id: I07a925c2a9404b0865e8a8703864ded9d14aa769

4 years agoMerge "benchmarks: Improve readme and convert to Markdown"
jenkins-bot [Sat, 27 Jan 2018 13:20:47 +0000 (13:20 +0000)]
Merge "benchmarks: Improve readme and convert to Markdown"

4 years agoRemove deprecated PreparedEdit properties
addshore [Sat, 27 Jan 2018 00:57:13 +0000 (16:57 -0800)]
Remove deprecated PreparedEdit properties

The following properties of PreparedEdit were deprecated in
1.21 and have been removed:
  * PreparedEdit->newText
  * PreparedEdit->oldText
  * PreparedEdit->pst

These have no use left in core or extensions.

Change-Id: Ic48c817aaf3fbb6d5f33678fcb4843180f0bc9fb

4 years agobenchmarks: Improve readme and convert to Markdown
Timo Tijhof [Sat, 27 Jan 2018 00:31:54 +0000 (16:31 -0800)]
benchmarks: Improve readme and convert to Markdown

* Add sections.
* Rename to *.md.
* Document that taskset is Linux-specific.

Change-Id: If6c5e54eda4dd1d6ea02445efa73e356dbc49016

4 years agoRemove "Created on" from file header comments
Umherirrender [Fri, 12 Jan 2018 21:03:53 +0000 (22:03 +0100)]
Remove "Created on" from file header comments

It is the job of git and svn to provide this information/metadata.
The form was different, some with short, some with long month name
some with leading zero at the day, some without.
The year is also present in the Copyright clause

Change-Id: If006907b82b9e45f13cfa2e45d41107a95570e1a

4 years agoUse ::class to resolve class names in tests
Umherirrender [Sat, 13 Jan 2018 00:02:09 +0000 (01:02 +0100)]
Use ::class to resolve class names in tests

This helps to find renamed or misspelled classes earlier.
Phan will check the class names

Change-Id: Ie541a7baae10ab6f5c13f95ac2ff6598b8f8950c

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 26 Jan 2018 21:15:50 +0000 (22:15 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I3c040bc4add0a8c325afa5d8403e8ce3f5842060

4 years agoMerge "rdbms: Simplify Database::factory()"
jenkins-bot [Fri, 26 Jan 2018 19:38:07 +0000 (19:38 +0000)]
Merge "rdbms: Simplify Database::factory()"

4 years agoMerge "Gallery: Use Parser::parseWidthParam() for gallery dimensions"
jenkins-bot [Fri, 26 Jan 2018 18:17:55 +0000 (18:17 +0000)]
Merge "Gallery: Use Parser::parseWidthParam() for gallery dimensions"

4 years agoMerge "Revert and fix "Revert "EditPage: Show EditFilterMergedContent hook errors...
jenkins-bot [Fri, 26 Jan 2018 18:01:45 +0000 (18:01 +0000)]
Merge "Revert and fix "Revert "EditPage: Show EditFilterMergedContent hook errors in an errorbox"""

4 years agoMerge "Improve 1-letter variable names in MutableContext and implementations"
jenkins-bot [Fri, 26 Jan 2018 17:49:40 +0000 (17:49 +0000)]
Merge "Improve 1-letter variable names in MutableContext and implementations"

4 years agoRevert and fix "Revert "EditPage: Show EditFilterMergedContent hook errors in an...
Brad Jorsch [Fri, 26 Jan 2018 17:12:28 +0000 (09:12 -0800)]
Revert and fix "Revert "EditPage: Show EditFilterMergedContent hook errors in an errorbox""

Instead of making a one-line fix to fix the issue in T149473, the change
was reverted.

This reverts commit 022f26e9fd3ae865331f3bb1b3eec63e212240c9.
This reverts commit 12f170502cfef525344ae69caef6240eaafbf63f.

Bug: T149473
Bug: T185638
Change-Id: Ib44ba2a6d2405309ad91bcc4d6440d05b67379da

4 years agoMake DatabaseMysqlBase::insertSelect() safer to use
Brad Jorsch [Fri, 26 Jan 2018 06:02:22 +0000 (22:02 -0800)]
Make DatabaseMysqlBase::insertSelect() safer to use

Certain server configurations, including the current MariaDB defaults,
make INSERT SELECT unsafe for replication in MySQL/MariaDB. When the
server configuration is not known to be safe, force the use of the
non-native implementation. Note this only has effect in CLI mode, as
non-CLI mode already forces the non-native implementation since
I2dba6024.

Also, native INSERT SELECT won't be safe with any statement-based
replication method if the order of rows in the SELECT is not
deterministic. Add a warning to the method's documentation pointing this
out.

Change-Id: I9173f6559809bd01830bd0a9f443c7269cc58ce2

4 years agoMerge "Don’t write to stderr when testing"
jenkins-bot [Fri, 26 Jan 2018 14:12:46 +0000 (14:12 +0000)]
Merge "Don’t write to stderr when testing"

4 years agoMerge "thumb.php: Set ENT_NOQUOTES for htmlspecialchars"
jenkins-bot [Fri, 26 Jan 2018 10:58:17 +0000 (10:58 +0000)]
Merge "thumb.php: Set ENT_NOQUOTES for htmlspecialchars"

4 years agoMerge "Remove misleading comment for $wgLegalTitleChars"
jenkins-bot [Fri, 26 Jan 2018 08:45:01 +0000 (08:45 +0000)]
Merge "Remove misleading comment for $wgLegalTitleChars"

4 years agoRemove misleading comment for $wgLegalTitleChars
Bartosz Dziewoński [Fri, 26 Jan 2018 08:28:35 +0000 (00:28 -0800)]
Remove misleading comment for $wgLegalTitleChars

This comment originates from rSVN1420 (9d51f616), dated 2 July 2003,
where it was written as "ISO 8859-* don't allow 0x80-0x9F... But that
breaks interlanguage links at the moment". It was rephrased to the
current form in rSVN2621 (840dee3a).

It is incorrect for two reasons:

* "Theoretically 0x80-0x9F of ISO 8859-1 should be disallowed..."

  We cannot disallow 0x80-0x9F here; this config variable actually
  specifies the valid ranges of *bytes* rather than characters, and
  0x80 to 0x9F can happily appear in valid UTF-8 encodings of other
  characters.

  In case we wanted to disallow the Unicode characters U+0080 to U+009F
  (encoded in UTF-8 as 0xC2 0x80 to 0xC2 0x9F), it would probably have
  to be done explicitly in MediaWikiTitleCodec::splitTitleString().
  (The task for this is T7732.)

* "...but this breaks interlanguage links"

  Back then, most wikis were using single-byte ISO encodings rather
  than UTF-8, and that is the only configuration this comment applies
  to: disallowing the bytes 0x80-0x9F in page titles on wikis using
  single-byte ISO encodings would indeed have broken interlanguage
  links from them to wikis using UTF-8. However, disallowing the
  Unicode characters U+0080 to U+009F today definitely would not break
  interlanguage links.

Change-Id: Ic5ba502ccfbb9cf3ff56cc47eb7fe463e7d45959

4 years agoMerge "Convert the sha1 value from base-36 to base-16"
jenkins-bot [Fri, 26 Jan 2018 06:54:37 +0000 (06:54 +0000)]
Merge "Convert the sha1 value from base-36 to base-16"

4 years agocleanupTitles: Don't add 'Broken/' prefix if the title is valid without it
Bartosz Dziewoński [Fri, 26 Jan 2018 03:17:01 +0000 (19:17 -0800)]
cleanupTitles: Don't add 'Broken/' prefix if the title is valid without it

In some cases, e.g. changes in Unicode normalization rules or
MediaWiki banning some invisible characters that were previously
allowed in titles, it's enough to just run the title through
normalization and update the database entry.

Change-Id: I786f31510bbd58c2ec02fc91918de5241c9050d6

4 years agoGallery: Use Parser::parseWidthParam() for gallery dimensions
Prateek Saxena [Sun, 19 Jun 2016 06:41:43 +0000 (12:11 +0530)]
Gallery: Use Parser::parseWidthParam() for gallery dimensions

Used by the `setWidths` and `setHeights` methods to make sure we are
using correct values.

Makes `parseWidthParam` static to be used in the gallery class.

Bug: T129372
Change-Id: I38b9ef0ea26e3748ad5d5458fadd2545f677ef93

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 25 Jan 2018 20:54:23 +0000 (21:54 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I10962812b862c1949ee0d196d6d70fd1c33445d1

4 years agoMerge "SpecialPage: Fix typo in comment"
jenkins-bot [Thu, 25 Jan 2018 20:48:44 +0000 (20:48 +0000)]
Merge "SpecialPage: Fix typo in comment"

4 years agoSpecialPage: Fix typo in comment
Bartosz Dziewoński [Thu, 25 Jan 2018 20:38:51 +0000 (12:38 -0800)]
SpecialPage: Fix typo in comment

Change-Id: I03f30b978e5dc7736d24873a04e91f5bb0171a86

4 years agoConvert the sha1 value from base-36 to base-16
RazeSoldier [Thu, 25 Jan 2018 04:58:06 +0000 (12:58 +0800)]
Convert the sha1 value from base-36 to base-16

Convert the sha1 value displayed on the file info page from base-36 to
base-16

Bug: T181651
Change-Id: I39d6d5d68973c9e67959b2bbbe77937f4ccca76a

4 years agoLivePreview: Add uselang parameter to API diff request
Fomafix [Thu, 25 Jan 2018 18:30:55 +0000 (19:30 +0100)]
LivePreview: Add uselang parameter to API diff request

Some elements like the line numbers of a diff depends on the user
interface language. This change ensures that the language of the user
interface is used of live preview diffs, too.

Bug: T185683
Change-Id: I438e19028700fb2d5bcd57d214e1134d656fb7b2

4 years agordbms: Simplify Database::factory()
Timo Tijhof [Wed, 24 Jan 2018 19:33:37 +0000 (11:33 -0800)]
rdbms: Simplify Database::factory()

Follows-up 0ff2b7a776 (T120333) which removed support for the
deprecated php 'mysql' extension.

It surprised me that the 'DatabaseMysql' entry could safely be removed
from $classAliases. This was because the key is not direct input,
but based on $canonicalDBTypes, which maps mysql to mysqli.

Take this further by removing the indirection between type, driver
and class name.

* Map built-in db types directly to their class and driver.
* Change fallback to assign $class directly from $dbType, without
  indirection of a $driver variable.
* Remove unused $classAliases.

Change-Id: I1200b07f66f23624410d848b6f382cb2dafa5c59

4 years agoMerge "Remove very, very old disabled test cases and todos"
jenkins-bot [Thu, 25 Jan 2018 17:01:54 +0000 (17:01 +0000)]
Merge "Remove very, very old disabled test cases and todos"

4 years agoMerge "widget: Fix changes of copyright year"
jenkins-bot [Thu, 25 Jan 2018 10:34:02 +0000 (10:34 +0000)]
Merge "widget: Fix changes of copyright year"

4 years agoMerge "Load preferences js/css in mobile"
jenkins-bot [Wed, 24 Jan 2018 22:55:50 +0000 (22:55 +0000)]
Merge "Load preferences js/css in mobile"

4 years agoMerge "Use RevisionLookup and RevisionFactory interfaces in Revision"
jenkins-bot [Wed, 24 Jan 2018 22:51:44 +0000 (22:51 +0000)]
Merge "Use RevisionLookup and RevisionFactory interfaces in Revision"

4 years agoUse RevisionLookup and RevisionFactory interfaces in Revision
addshore [Tue, 9 Jan 2018 08:53:38 +0000 (08:53 +0000)]
Use RevisionLookup and RevisionFactory interfaces in Revision

Lets not depend on the big blob that is RevisionStore.
Try to bind to the nice interfaces that we have where possible.

In the future RevisionStore should be split up further into
it's individual interfaces.

It looks like there are some more methods which should be moved
to both RevisionLookup and RevisionFactory.
See draft:
I214c5952d4a0fad55ff4116e90eab9ac3ba54fd3

Change-Id: I8df61374e24abcf4a7e38e53647489b8ecc1fd77

4 years agoExtra tests for SqlBlobStore with 'windows-1252' legacy encoding
addshore [Thu, 11 Jan 2018 20:55:37 +0000 (20:55 +0000)]
Extra tests for SqlBlobStore with 'windows-1252' legacy encoding

Bug: T184749
Change-Id: Ida717dbe6ae742b3b61f0f09dc60712307c53a96

4 years agoselenium: add new message banner test to user spec
addshore [Sat, 13 Jan 2018 14:25:09 +0000 (14:25 +0000)]
selenium: add new message banner test to user spec

Change-Id: I92dc612d215d1d3eb8dff02c2ff4d57da0105d69

4 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 24 Jan 2018 20:55:30 +0000 (21:55 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I31c3b81ae100f17d7fecb607b2a0a1ab4a9b60b1

4 years agowidget: Fix changes of copyright year
Kunal Mehta [Wed, 24 Jan 2018 19:59:05 +0000 (11:59 -0800)]
widget: Fix changes of copyright year

Fixes up e8b10f68049c19a.

Change-Id: I474e508a2bd4d783272eda87c1cc91f5597bc1b1

4 years agoMerge "Simplify documentation headers of includes/widgets/…Widget.php files"
jenkins-bot [Wed, 24 Jan 2018 19:14:56 +0000 (19:14 +0000)]
Merge "Simplify documentation headers of includes/widgets/…Widget.php files"

4 years agoLoad preferences js/css in mobile
jdlrobson [Wed, 24 Jan 2018 18:54:05 +0000 (10:54 -0800)]
Load preferences js/css in mobile

Change-Id: Idbf62486c787179ee67deb22e4644f4fc742d9db

4 years agoMerge "poolcounter: Fix type hint for PoolWorkArticleView::getParserOutput"
jenkins-bot [Wed, 24 Jan 2018 18:53:19 +0000 (18:53 +0000)]
Merge "poolcounter: Fix type hint for PoolWorkArticleView::getParserOutput"