lhc/web/wiklou.git
6 years agoAdd SPARQL client to core
Stanislav Malyshev [Sat, 13 Jan 2018 01:00:28 +0000 (17:00 -0800)]
Add SPARQL client to core

This will be used for deep category search implementation,
also Wikibase one in repo/maintenance will be changed
to use the same codebase.

Bug: T185127
Change-Id: Ie8dd4a5aff55d90f02426f1430ed5214c7327bbc

6 years agoMerge "Create factory for MWHttpRequest"
jenkins-bot [Tue, 23 Jan 2018 19:49:25 +0000 (19:49 +0000)]
Merge "Create factory for MWHttpRequest"

6 years agoCreate factory for MWHttpRequest
Stanislav Malyshev [Tue, 16 Jan 2018 23:11:08 +0000 (15:11 -0800)]
Create factory for MWHttpRequest

This will allow classes that need MWHttpRequest to inject HttpRequestFactory
and thus make it overridable and testable.

Also made MWHttpRequest abstract class since it doesn't implement
execute anyway. Maybe a good idea to move execute to an abstract
method?

Change-Id: I5c0e035542ff5f791a21a95ed13bed4cea6906d0

6 years agoExtensionRegistry: Properly detect if a global is already set
Marius Hoch [Tue, 23 Jan 2018 18:44:28 +0000 (10:44 -0800)]
ExtensionRegistry: Properly detect if a global is already set

$foo = null; isset( $foo ); will yield false.

Sometimes we want to explicitly set a config to null, but ExtensionRegistry
is then overriding this variable with the default value.

This is no consistent with the old workflow:
require_once the extension and then override the setting with null.

Bug: T128661
Change-Id: I0654c9369a596e84591fcaa9643703e6b4ccf57e

6 years agoMerge "Add collation for Abkhaz (ab)"
jenkins-bot [Tue, 23 Jan 2018 18:42:29 +0000 (18:42 +0000)]
Merge "Add collation for Abkhaz (ab)"

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

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

Change-Id: I1d4567f47f93eb1436cb98558388e48d35258666

6 years agoMerge "rdbms: make LoadBalancer::waitForAll() better respect the timeout"
jenkins-bot [Tue, 23 Jan 2018 17:26:12 +0000 (17:26 +0000)]
Merge "rdbms: make LoadBalancer::waitForAll() better respect the timeout"

6 years agoMerge "Use getSize since SearchSuggestionSet does not implement Countable"
jenkins-bot [Tue, 23 Jan 2018 16:00:20 +0000 (16:00 +0000)]
Merge "Use getSize since SearchSuggestionSet does not implement Countable"

6 years agoMake Gender normalize usernames
Brian Wolff [Sun, 17 Dec 2017 22:12:06 +0000 (22:12 +0000)]
Make Gender normalize usernames

This ensures that if GENDER is fed wfEscapeWikitext()'d version
of a username, it will normalize it.

See discussion on T182800.

Note, we do not need to worry about the case of a user named
"Project:*foo" as such namespace prefixes are illegal in
usernames.

Change-Id: Ic5a8fc76c28dca43ce8e334ef1874c2673433f00

6 years agoMerge "Use MediaWiki\restoreWarnings in deprecated wfRestoreWarnings"
jenkins-bot [Mon, 22 Jan 2018 21:03:03 +0000 (21:03 +0000)]
Merge "Use MediaWiki\restoreWarnings in deprecated wfRestoreWarnings"

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 22 Jan 2018 20:55:34 +0000 (21:55 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I89efc6e7a8f23ef71268502cda5542338ee892fe

6 years agoMerge "Widgets: Allow titles with name of Object.prototypes"
jenkins-bot [Mon, 22 Jan 2018 20:35:26 +0000 (20:35 +0000)]
Merge "Widgets: Allow titles with name of Object.prototypes"

6 years agoMerge "mediawiki.special.upload: Use ES5 .forEach() instead of jQuery"
jenkins-bot [Mon, 22 Jan 2018 20:24:58 +0000 (20:24 +0000)]
Merge "mediawiki.special.upload: Use ES5 .forEach() instead of jQuery"

6 years agoUse getSize since SearchSuggestionSet does not implement Countable
Stanislav Malyshev [Mon, 22 Jan 2018 20:13:34 +0000 (12:13 -0800)]
Use getSize since SearchSuggestionSet does not implement Countable

Bug: T184934
Change-Id: I39459352399e2023149b715b049084826df22935

6 years agomediawiki.special.upload: Use ES5 .forEach() instead of jQuery
Fomafix [Fri, 19 Jan 2018 10:16:19 +0000 (11:16 +0100)]
mediawiki.special.upload: Use ES5 .forEach() instead of jQuery

Replace
* $.each( array, function ( index, value ) { ... } ) by
  array.forEach( function ( value ) { ... } )

Change-Id: I0574f130e93b53895e2c76363285084a6df05649

6 years agoMerge "Use native ES5 Array prototype methods instead of jQuery"
jenkins-bot [Mon, 22 Jan 2018 19:37:15 +0000 (19:37 +0000)]
Merge "Use native ES5 Array prototype methods instead of jQuery"

6 years agoMerge "Set default fragment mode to [ 'legacy', 'html5' ]"
jenkins-bot [Mon, 22 Jan 2018 19:02:35 +0000 (19:02 +0000)]
Merge "Set default fragment mode to [ 'legacy', 'html5' ]"

6 years agoUse MediaWiki\restoreWarnings in deprecated wfRestoreWarnings
WMDE-Fisch [Mon, 22 Jan 2018 17:53:09 +0000 (18:53 +0100)]
Use MediaWiki\restoreWarnings in deprecated wfRestoreWarnings

This will give devs a better hint on how to replace this.

Change-Id: I2332b6173b7816aef11841725752745e174fa69f

6 years agoMerge "selenium: add re-creatable page test to page spec"
jenkins-bot [Mon, 22 Jan 2018 17:04:13 +0000 (17:04 +0000)]
Merge "selenium: add re-creatable page test to page spec"

6 years agoMerge "selenium, add restoration test to page spec"
jenkins-bot [Mon, 22 Jan 2018 17:02:24 +0000 (17:02 +0000)]
Merge "selenium, add restoration test to page spec"

6 years agoMerge "selenium: add deletion test to page spec"
jenkins-bot [Mon, 22 Jan 2018 15:58:52 +0000 (15:58 +0000)]
Merge "selenium: add deletion test to page spec"

6 years agoReplace some of MaintenanceTest with dataProviders
Adam Roses Wight [Wed, 17 Jan 2018 13:33:10 +0000 (08:33 -0500)]
Replace some of MaintenanceTest with dataProviders

Bug: T184775
Change-Id: Icbaf3cbcf3c51e5b4cd53d55a5230534e74a0a38

6 years agoMerge "Refactor MaintenanceTest to use a base test case"
jenkins-bot [Mon, 22 Jan 2018 06:33:59 +0000 (06:33 +0000)]
Merge "Refactor MaintenanceTest to use a base test case"

6 years agoMerge "Begin splitting out maintenance test base classes"
jenkins-bot [Mon, 22 Jan 2018 06:31:03 +0000 (06:31 +0000)]
Merge "Begin splitting out maintenance test base classes"

6 years agoMerge "mediawiki.api.category: Use formatversion=2 and simplify code"
jenkins-bot [Mon, 22 Jan 2018 06:20:08 +0000 (06:20 +0000)]
Merge "mediawiki.api.category: Use formatversion=2 and simplify code"

6 years agoRefactor MaintenanceTest to use a base test case
Adam Roses Wight [Wed, 17 Jan 2018 13:32:00 +0000 (08:32 -0500)]
Refactor MaintenanceTest to use a base test case

Bug: T184775
Change-Id: I0cb2320f765e847a59c721918401da07a3a2b24a

6 years agoBegin splitting out maintenance test base classes
Adam Roses Wight [Tue, 16 Jan 2018 16:28:38 +0000 (11:28 -0500)]
Begin splitting out maintenance test base classes

Bug: T184775
Change-Id: I73c2f3c6975deec50cf879201cf292c217b51c51

6 years agoMerge "mediawiki.ForeignStructuredUpload: Simplify code by using ES5"
jenkins-bot [Mon, 22 Jan 2018 05:01:41 +0000 (05:01 +0000)]
Merge "mediawiki.ForeignStructuredUpload: Simplify code by using ES5"

6 years agoMerge "Use ES5 String.prototype.trim() instead of jQuery.trim()"
jenkins-bot [Mon, 22 Jan 2018 01:44:51 +0000 (01:44 +0000)]
Merge "Use ES5 String.prototype.trim() instead of jQuery.trim()"

6 years agoMerge "mediawiki.special.upload: Use mediawiki.api.parse"
jenkins-bot [Mon, 22 Jan 2018 01:37:19 +0000 (01:37 +0000)]
Merge "mediawiki.special.upload: Use mediawiki.api.parse"

6 years agoMerge "mediawiki.special.upload: Show an error message on "|""
jenkins-bot [Mon, 22 Jan 2018 01:35:34 +0000 (01:35 +0000)]
Merge "mediawiki.special.upload: Show an error message on "|""

6 years agoMerge "mediawiki.special.upload: trim nameToCheck"
jenkins-bot [Sun, 21 Jan 2018 22:19:33 +0000 (22:19 +0000)]
Merge "mediawiki.special.upload: trim nameToCheck"

6 years agowatch.js: Let api.js do the joining of the array
Fomafix [Sun, 21 Jan 2018 21:35:37 +0000 (22:35 +0100)]
watch.js: Let api.js do the joining of the array

Change-Id: Ie283ed3e071fe1a041f040e72cac061ebc3209d0

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 21 Jan 2018 20:54:05 +0000 (21:54 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ie8641f203a6bd289d018a571c56cda69d4a9e2bb

6 years agoUse ES5 String.prototype.trim() instead of jQuery.trim()
Fomafix [Sun, 21 Jan 2018 19:10:42 +0000 (20:10 +0100)]
Use ES5 String.prototype.trim() instead of jQuery.trim()

Replace:
* $.trim( str ) by str.trim()

Ensure that str is a string before calling str.trim().

Change-Id: I48f08fdac1e7d802813563c4691e9bbaf2c78336

6 years agomediawiki.special.upload: Show an error message on "|"
Fomafix [Sun, 21 Jan 2018 14:41:30 +0000 (15:41 +0100)]
mediawiki.special.upload: Show an error message on "|"

This change prevents that "|" is interpreted as title separator and
shows the following message when the title contains a "|" character:

  The requested page title contains invalid characters: "|".

Before this change the following message is shown on this case:

  The requested page title is empty or contains only the name of a
  namespace.

Change-Id: If67ed573ea0b5c28c59a7d90e8581c4b67528450

6 years agomediawiki.special.upload: Use mediawiki.api.parse
Fomafix [Sun, 21 Jan 2018 13:54:14 +0000 (14:54 +0100)]
mediawiki.special.upload: Use mediawiki.api.parse

This also adds the parameter contentmodel=wikitext to the API request.
This ensures that the text is always parsed as wikitext, even with a
title with a different content model like 'MediaWiki:Common.js'.

Change-Id: I29f0c76c3354a8c97b8296224e14341f71726c2f

6 years agomediawiki.ForeignStructuredUpload: Simplify code by using ES5
Fomafix [Sun, 21 Jan 2018 09:45:43 +0000 (10:45 +0100)]
mediawiki.ForeignStructuredUpload: Simplify code by using ES5

For iterating over an array replace for() by .push.apply() and .map().

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push#Merging_two_arrays
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map

Change-Id: I0bb4ed7f71db1e60eb4d76a77c53d022bb2081d1

6 years agoMerge "Use HTTPS instead of HTTP for caniuse.com"
jenkins-bot [Sun, 21 Jan 2018 06:11:44 +0000 (06:11 +0000)]
Merge "Use HTTPS instead of HTTP for caniuse.com"

6 years agordbms: make LoadBalancer::waitForAll() better respect the timeout
Aaron Schulz [Tue, 16 Jan 2018 16:58:59 +0000 (17:58 +0100)]
rdbms: make LoadBalancer::waitForAll() better respect the timeout

If several replicas (or even all) had replication stuck, then the
timeout would happen for each server, one after another.

Change-Id: Id5431360b9cde7e5dc0115a1f41b9903003f47c4

6 years agoUpdate RunningStat use statement
Reedy [Sun, 21 Jan 2018 04:40:34 +0000 (04:40 +0000)]
Update RunningStat use statement

Bug: T182273
Change-Id: If9e946e767ca8f4c1af9b1a4855bbbffb98deff5

6 years agoUpdate WrappedString use statements
Reedy [Sun, 21 Jan 2018 04:39:17 +0000 (04:39 +0000)]
Update WrappedString use statements

Bug: T182273
Change-Id: Ia9515863491fa9c8684698fa33612eec5eb6d937

6 years agoUpdate IPSet use statements
Reedy [Sun, 21 Jan 2018 04:37:26 +0000 (04:37 +0000)]
Update IPSet use statements

Bug: T182273
Change-Id: I73fb52678dc56a542eccd209441557610b562d4b

6 years agoUpdate RelPath calls
Reedy [Sun, 21 Jan 2018 04:33:38 +0000 (04:33 +0000)]
Update RelPath calls

Bug: T182273
Change-Id: Ifd04e3b3ab72cc56bef48a1fc18fccb34b0af618

6 years agoMerge "Bypass wfGetDB when LoadBalancer is used in scope"
jenkins-bot [Sun, 21 Jan 2018 01:19:00 +0000 (01:19 +0000)]
Merge "Bypass wfGetDB when LoadBalancer is used in scope"

6 years agoUse HTTPS instead of HTTP for caniuse.com
Fomafix [Sun, 21 Jan 2018 00:41:04 +0000 (01:41 +0100)]
Use HTTPS instead of HTTP for caniuse.com

http://caniuse.com/ redirects to https://caniuse.com/

Change-Id: Iea8de252320a5a3aeda83dc21df5e51de2faf66c

6 years agomediawiki.special.upload: trim nameToCheck
Fomafix [Sun, 21 Jan 2018 00:17:43 +0000 (01:17 +0100)]
mediawiki.special.upload: trim nameToCheck

The API ignores titles consists only on spaces and returns a response
without a "query" key.

Bug: T185400
Change-Id: Ia365f6660c0da0138a9035aad8dfcda38fab7733

6 years agoFollow-up 95e7c545: Fix .gitattributes file line truncation
James D. Forrester [Sat, 20 Jan 2018 23:30:38 +0000 (15:30 -0800)]
Follow-up 95e7c545: Fix .gitattributes file line truncation

Change-Id: I82bf4beeed41cde89da3f1f8bc517420bdfd03ad

6 years agoMerge "Change "Special:近易" to "Special:監修" in zh-classical"
jenkins-bot [Sat, 20 Jan 2018 22:13:51 +0000 (22:13 +0000)]
Merge "Change "Special:近易" to "Special:監修" in zh-classical"

6 years agoBypass wfGetDB when LoadBalancer is used in scope
Umherirrender [Sat, 20 Jan 2018 20:07:17 +0000 (21:07 +0100)]
Bypass wfGetDB when LoadBalancer is used in scope

wfGetDB calls LoadBalander::getConnection for $wiki=false,
when there is already a LoadBalancer in scope, call it directly

Change-Id: I4e29fd4e93a0d1f274e61af99c96021d3d06f8f3

6 years agoReplace deprecated wfGetLB() calls here and there
WMDE-Fisch [Thu, 4 Jan 2018 16:38:22 +0000 (17:38 +0100)]
Replace deprecated wfGetLB() calls here and there

Change-Id: Ic7cec2dcc6b8e0d500a4c37eb134976b314c33ca

6 years agoUpdate UserSaveOptions/UserSaveSettings hook descriptions
Thiemo Mättig [Thu, 11 Jan 2018 13:21:58 +0000 (14:21 +0100)]
Update UserSaveOptions/UserSaveSettings hook descriptions

I already updated
https://www.mediawiki.org/wiki/Manual:Hooks/UserSaveOptions
https://www.mediawiki.org/wiki/Manual:Hooks/UserSaveSettings
accordingly.

Change-Id: I492f83aa8acb6521f3e175fdbf507a7e44491ca2

6 years agoAdd abstract functions to abstract class..
Reedy [Fri, 1 Dec 2017 19:33:10 +0000 (19:33 +0000)]
Add abstract functions to abstract class..

Rather than just expecting the child class to have them

Change-Id: Ib145d333e3b8908a8535e974ec8f1f69b2b10e3a

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 20 Jan 2018 12:56:38 +0000 (13:56 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Icba7b1ff1e696b84333f8a8adaf79c2d8d16d7de

6 years agoMerge "Remove unused SpecialPasswordReset::$passwords"
jenkins-bot [Sat, 20 Jan 2018 12:20:06 +0000 (12:20 +0000)]
Merge "Remove unused SpecialPasswordReset::$passwords"

6 years agoMerge "Fix variable name to match code"
jenkins-bot [Sat, 20 Jan 2018 12:15:37 +0000 (12:15 +0000)]
Merge "Fix variable name to match code"

6 years agoMerge "Remove 2 unused private fields from ApiFormatBase"
jenkins-bot [Sat, 20 Jan 2018 12:14:24 +0000 (12:14 +0000)]
Merge "Remove 2 unused private fields from ApiFormatBase"

6 years agoMerge "Remove User::$mGroups"
jenkins-bot [Sat, 20 Jan 2018 12:14:21 +0000 (12:14 +0000)]
Merge "Remove User::$mGroups"

6 years agoselenium: add re-creatable page test to page spec
addshore [Sat, 13 Jan 2018 14:06:39 +0000 (14:06 +0000)]
selenium: add re-creatable page test to page spec

Change-Id: I61c452246c29bd22000a06844901dfe8ca06fadd

6 years agoselenium, add restoration test to page spec
addshore [Sat, 13 Jan 2018 13:52:35 +0000 (13:52 +0000)]
selenium, add restoration test to page spec

Change-Id: Ied06915f982e693b00edab14b8c29c978a5d6dff

6 years agoselenium: add deletion test to page spec
addshore [Sat, 13 Jan 2018 12:56:46 +0000 (12:56 +0000)]
selenium: add deletion test to page spec

Change-Id: Ia17b52958778a09378eeb10c9f24ebe9229bd9f5

6 years agoSpecial:Upload: Use user interface language for error message
Fomafix [Tue, 19 Apr 2016 16:32:50 +0000 (16:32 +0000)]
Special:Upload: Use user interface language for error message

This change adds the parameters errorformat=html and errorlang with the user
interface language code to the API request.

Bug: T133059
Change-Id: I75b3c9537a8805367d36a4e51453a9f9219c9555

6 years agoConfigFactory: Improve error message for invalid callback
Umherirrender [Sat, 20 Jan 2018 09:44:46 +0000 (10:44 +0100)]
ConfigFactory: Improve error message for invalid callback

Getting the following error for an invalid callback in extension
registration is not helpful:
Fatal error: Uncaught exception 'InvalidArgumentException' with message
'Invalid callback provided' in /includes/config/ConfigFactory.php:108

Changed message to
Invalid callback '$1' provided

Added a test case for the instanceof part of the if

Change-Id: I425e2607b651c666336289c2c0d93730bb6312ed

6 years agoMerge "Update wikimedia dependencies"
MaxSem [Sat, 20 Jan 2018 07:16:31 +0000 (07:16 +0000)]
Merge "Update wikimedia dependencies"

6 years agoMerge "mediawiki.Uri: Don't double-escape fragments"
jenkins-bot [Sat, 20 Jan 2018 03:08:48 +0000 (03:08 +0000)]
Merge "mediawiki.Uri: Don't double-escape fragments"

6 years agoMerge "Localize namespaces to inh"
jenkins-bot [Sat, 20 Jan 2018 03:04:53 +0000 (03:04 +0000)]
Merge "Localize namespaces to inh"

6 years agoSet default fragment mode to [ 'legacy', 'html5' ]
Max Semenik [Sat, 20 Jan 2018 02:36:30 +0000 (18:36 -0800)]
Set default fragment mode to [ 'legacy', 'html5' ]

This is step one in migration, 1.35 LTS should make it
[ 'html5', 'legacy' ].

Also issue deprecation warnings for $wgExperimentalHtmlIds.

Bug: T152540
Bug: T139744
Change-Id: I8780bb589002a4f836ba90bd18093a56cddc3ddf

6 years agoRemove unused SpecialPasswordReset::$passwords
Max Semenik [Sat, 20 Jan 2018 00:38:55 +0000 (16:38 -0800)]
Remove unused SpecialPasswordReset::$passwords

Change-Id: I4c03bd9b7f01bacba453a263c3676b4f47aec933

6 years agoFix variable name to match code
Max Semenik [Sat, 20 Jan 2018 00:36:52 +0000 (16:36 -0800)]
Fix variable name to match code

Change-Id: Idb97c9c5379d2ba4f0874ceaffcf48870bdd682e

6 years agoRemove 2 unused private fields from ApiFormatBase
Max Semenik [Sat, 20 Jan 2018 00:35:44 +0000 (16:35 -0800)]
Remove 2 unused private fields from ApiFormatBase

Change-Id: I20018c7c5a2bff451db44fdb605120942500c5e1

6 years agoRemove User::$mGroups
Max Semenik [Sat, 20 Jan 2018 00:33:59 +0000 (16:33 -0800)]
Remove User::$mGroups

Deprecated and unused. Private so nothing can possibly use it.

Change-Id: I70a20d35222cb0571e8b401c8b4e031d0be25d6b

6 years agomediawiki.Uri: Don't double-escape fragments
Roan Kattouw [Fri, 19 Jan 2018 23:16:29 +0000 (15:16 -0800)]
mediawiki.Uri: Don't double-escape fragments

Fragments were ingested already-escaped, then escaped again
when serializing. To prevent double-escaping, decode fragments
when ingesting them.

Bug: T183710
Change-Id: I19fc889bb7bde446476203bf6d6352dce8298256

6 years agoMerge "Follow-up 5aea96df: Add release notes for File SHA1 display"
jenkins-bot [Fri, 19 Jan 2018 18:47:18 +0000 (18:47 +0000)]
Merge "Follow-up 5aea96df: Add release notes for File SHA1 display"

6 years agoMerge "Move standard tar ignores to .gitattributes so `git archive` works"
jenkins-bot [Fri, 19 Jan 2018 18:35:23 +0000 (18:35 +0000)]
Merge "Move standard tar ignores to .gitattributes so `git archive` works"

6 years agoFollow-up 5aea96df: Add release notes for File SHA1 display
RazeSoldier [Thu, 18 Jan 2018 07:16:09 +0000 (15:16 +0800)]
Follow-up 5aea96df: Add release notes for File SHA1 display

Bug: T181651
Change-Id: I5e75f88d30954423aab8876687d959c3b400d2b6

6 years agoMerge "Move methods for handling external usernames to a dedicated class"
jenkins-bot [Fri, 19 Jan 2018 14:43:41 +0000 (14:43 +0000)]
Merge "Move methods for handling external usernames to a dedicated class"

6 years agoUpdate wikimedia dependencies
Reedy [Thu, 18 Jan 2018 21:15:07 +0000 (21:15 +0000)]
Update wikimedia dependencies

Updated:
* wikimedia/ip-set 1.1.0 -> 1.2.0
* wikimedia/relpath 2.0.0 -> 2.1.1
* wikimedia/running-stat 1.1.0 -> 1.2.1
* wikimedia/wrappedstring 2.2.0 -> 2.3.0

https://github.com/wikimedia/IPSet/compare/1.1.0...1.2.0
https://github.com/wikimedia/relpath/compare/2.0.0...2.1.1
https://github.com/wikimedia/runningstat/compare/v1.1.0...v1.2.1
https://github.com/wikimedia/WrappedString/compare/v2.2.0...v2.3.0

Bug: T182273
Change-Id: I23a734e7a5b9a7ff4d46901a9c5b3b51402687d5
Depends-On: Ib2402f41262549207c8386d74855240ca0d4a54b

6 years agoPHPVersionCheck: PHP 5.5.0 is no longer supported by upstream, but 5.6.0 is
James D. Forrester [Thu, 18 Jan 2018 23:50:41 +0000 (15:50 -0800)]
PHPVersionCheck: PHP 5.5.0 is no longer supported by upstream, but 5.6.0 is

Change-Id: I7031f0e909db8d63012f4057939292cb3b472cde

6 years agoMerge "Test HHVM LTS versions 3.21 and 3.24 on travis"
jenkins-bot [Thu, 18 Jan 2018 23:15:39 +0000 (23:15 +0000)]
Merge "Test HHVM LTS versions 3.21 and 3.24 on travis"

6 years agoMove standard tar ignores to .gitattributes so `git archive` works
Chad Horohoe [Thu, 18 Jan 2018 22:30:49 +0000 (14:30 -0800)]
Move standard tar ignores to .gitattributes so `git archive` works

Change-Id: Ib12a21827d85f781030309cf400f3207c8bbd8dd

6 years agoMerge "Fix phpdoc since $proto can be int"
jenkins-bot [Thu, 18 Jan 2018 21:30:29 +0000 (21:30 +0000)]
Merge "Fix phpdoc since $proto can be int"

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 18 Jan 2018 21:25:06 +0000 (22:25 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I9bc9cb1c35fe84a38e237496306ddae98e904a40

6 years agoFix phpdoc since $proto can be int
Stanislav Malyshev [Thu, 18 Jan 2018 21:05:42 +0000 (13:05 -0800)]
Fix phpdoc since $proto can be int

In fact, some of the PROTO_* constants are ints,
some strings and one is null (PROTO_CURRENT).

Change-Id: I69c45ab87360ed1ab54b53b7e9e959ea566b4cba

6 years agoMove methods for handling external usernames to a dedicated class
Amir Sarabadani [Thu, 11 Jan 2018 12:20:35 +0000 (13:20 +0100)]
Move methods for handling external usernames to a dedicated class

This makes things centralized to reduce maintenance cost and also
enables me to use this methods in Wikibase to handle RC injection

Bug: T185034
Change-Id: Ic8c602e316144ccb5b05c69a0cc607cd53e38912

6 years agomediawiki.api.category: Use formatversion=2 and simplify code
Fomafix [Thu, 18 Jan 2018 19:23:00 +0000 (20:23 +0100)]
mediawiki.api.category: Use formatversion=2 and simplify code

Change-Id: Icc8a193d16cb375593196e9290968f6dac1bc021

6 years agoRevert accidentally removed trait
Adam Roses Wight [Tue, 16 Jan 2018 23:42:29 +0000 (18:42 -0500)]
Revert accidentally removed trait

Change-Id: I82283be89f3f155d7793d4c900927d81a60d5e95

6 years agoUse native ES5 Array prototype methods instead of jQuery
Fomafix [Thu, 18 Jan 2018 15:24:43 +0000 (16:24 +0100)]
Use native ES5 Array prototype methods instead of jQuery

Replace
* $.each( array, function ( index, value ) { ... } ) by
  array.forEach( function ( value ) { ... } )

* $.each( array, function () { ... this ... } ) by
  array.forEach( function ( value ) { ... value ... } )

Also replace forEach by map, to simplify the code.

Change-Id: I657c737d356cb6e310bc6351a7869a60955ebed9

6 years agoMerge "Add PHPUnit tests for ApiDelete"
jenkins-bot [Thu, 18 Jan 2018 16:07:25 +0000 (16:07 +0000)]
Merge "Add PHPUnit tests for ApiDelete"

6 years agoAdd PHPUnit tests for ApiDelete
Yifei He [Sun, 14 Jan 2018 09:52:57 +0000 (17:52 +0800)]
Add PHPUnit tests for ApiDelete

This covers deleting non-file pages.

Bug: T183886
Change-Id: I31c27786b16b55f8bf4cf528bf4c1ea49075e02e

6 years agoTest HHVM LTS versions 3.21 and 3.24 on travis
Reedy [Sat, 30 Dec 2017 03:04:54 +0000 (03:04 +0000)]
Test HHVM LTS versions 3.21 and 3.24 on travis

Change-Id: I7f772443808f936c0d75910fd18bf8cbd0204088

6 years agoMerge "JavaScriptMinifier: Remove support for unused $maxLineLength param"
jenkins-bot [Thu, 18 Jan 2018 04:00:47 +0000 (04:00 +0000)]
Merge "JavaScriptMinifier: Remove support for unused $maxLineLength param"

6 years agoMerge "JavaScriptMinifier: Enable phpcs and fix violations"
jenkins-bot [Thu, 18 Jan 2018 03:46:57 +0000 (03:46 +0000)]
Merge "JavaScriptMinifier: Enable phpcs and fix violations"

6 years agoMerge "JavaScriptMinifier: Fix "Uninitialized offset" in string and regexp parsing"
jenkins-bot [Thu, 18 Jan 2018 03:29:10 +0000 (03:29 +0000)]
Merge "JavaScriptMinifier: Fix "Uninitialized offset" in string and regexp parsing"

6 years agoMerge "JavaScriptMinifier: Improve docs for parsing of string literals"
jenkins-bot [Thu, 18 Jan 2018 03:26:44 +0000 (03:26 +0000)]
Merge "JavaScriptMinifier: Improve docs for parsing of string literals"

6 years agoMerge "SpecialLog: Don't ignore offender when it's a nonexistent username"
jenkins-bot [Thu, 18 Jan 2018 03:09:53 +0000 (03:09 +0000)]
Merge "SpecialLog: Don't ignore offender when it's a nonexistent username"

6 years agoMerge "Non-MySQL comment table updates"
jenkins-bot [Thu, 18 Jan 2018 03:06:45 +0000 (03:06 +0000)]
Merge "Non-MySQL comment table updates"

6 years agoMerge "Add more data to categories dump"
jenkins-bot [Wed, 17 Jan 2018 21:58:31 +0000 (21:58 +0000)]
Merge "Add more data to categories dump"

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 17 Jan 2018 21:21:59 +0000 (22:21 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I481c1a4d2cbf95edaae321815b41a44e455ea305

6 years agoSpecialLog: Don't ignore offender when it's a nonexistent username
Brad Jorsch [Wed, 17 Jan 2018 15:44:29 +0000 (10:44 -0500)]
SpecialLog: Don't ignore offender when it's a nonexistent username

When viewing the suppression log, the 'offender' field is ignored if it
specifies a username that happens to not exist locally. It would make
more sense for it to filter by that name and return an empty list.

Ideally such searches would have the possibility of succeeding, since
imported log entries can be attributed to a nonexistent user, but the
necessary data isn't currently being stored. The actor table patch
(I8d825eb0) will start storing that data once migration begins, although
a maintenance script run would be needed to populate it for old log
entries.

Change-Id: I73ac78f7623178ab878135b910a22013723885d3

6 years agoRemove support for PHP extension 'mysql' (not mysqli!)
Seb35 [Tue, 16 Jan 2018 19:02:11 +0000 (20:02 +0100)]
Remove support for PHP extension 'mysql' (not mysqli!)

This PHP extension was deprecated in PHP 5.5 and removed in PHP 7.0.
The newer MySQL driver 'mysqli' is the default driver since MediaWiki
1.22 and 'mysql' was deprecated in MediaWiki 1.30.

Bug: T120333
Change-Id: Icff7a63ab47ae1483de87ba6486945974699362b