lhc/web/wiklou.git
5 years agoRe-enable MediaWiki.Files.ClassMatchesFilename sniffs
Kunal Mehta [Thu, 24 May 2018 02:23:49 +0000 (19:23 -0700)]
Re-enable MediaWiki.Files.ClassMatchesFilename sniffs

Change-Id: I63f54b0336168a50aef72e38202e153677eafd3c

5 years agoHave class match filename in some maintenance scripts
Kunal Mehta [Thu, 24 May 2018 01:34:01 +0000 (18:34 -0700)]
Have class match filename in some maintenance scripts

Each of these scripts had a class name that was not referenced outside
of the script file itself, and are safe to rename as a result.

Change-Id: Id605aca11db51ee433baeaa998a0e33184c930ca

5 years agoMerge "Update wikimedia/wrappedstring to v3.0.0"
jenkins-bot [Thu, 24 May 2018 02:14:00 +0000 (02:14 +0000)]
Merge "Update wikimedia/wrappedstring to v3.0.0"

5 years agoMerge "IP: Fix sanitization of IPv4 ranges"
jenkins-bot [Thu, 24 May 2018 00:31:31 +0000 (00:31 +0000)]
Merge "IP: Fix sanitization of IPv4 ranges"

5 years agoMerge "Fix MediaWiki.Commenting.LicenseComment.InvalidLicenseTag errors"
jenkins-bot [Thu, 24 May 2018 00:27:01 +0000 (00:27 +0000)]
Merge "Fix MediaWiki.Commenting.LicenseComment.InvalidLicenseTag errors"

5 years agoMerge "RELEASE-NOTES-1.32: Line wrap to 80 chars"
jenkins-bot [Thu, 24 May 2018 00:08:04 +0000 (00:08 +0000)]
Merge "RELEASE-NOTES-1.32: Line wrap to 80 chars"

5 years agoMerge "Enable deleteAutoPatrolLogs to delete pre-2011 autopatrol logs as well"
jenkins-bot [Wed, 23 May 2018 23:48:44 +0000 (23:48 +0000)]
Merge "Enable deleteAutoPatrolLogs to delete pre-2011 autopatrol logs as well"

5 years agoRELEASE-NOTES-1.32: Line wrap to 80 chars
James D. Forrester [Wed, 23 May 2018 21:59:52 +0000 (14:59 -0700)]
RELEASE-NOTES-1.32: Line wrap to 80 chars

Change-Id: I673efe2777da17bd44788ee8a11707e040242176

5 years agoFix MediaWiki.Commenting.LicenseComment.InvalidLicenseTag errors
Kunal Mehta [Wed, 23 May 2018 23:23:42 +0000 (16:23 -0700)]
Fix MediaWiki.Commenting.LicenseComment.InvalidLicenseTag errors

Change-Id: I936c3f5fca1a0061f215e80469f5d882cb32ee29

5 years agoEnable deleteAutoPatrolLogs to delete pre-2011 autopatrol logs as well
Amir Sarabadani [Fri, 18 May 2018 13:46:47 +0000 (15:46 +0200)]
Enable deleteAutoPatrolLogs to delete pre-2011 autopatrol logs as well

Bug: T184485
Change-Id: I3f123ea0ae69f80beec7425be0f3e4c00a409c0d

5 years agoUpdate wikimedia/wrappedstring to v3.0.0
Timo Tijhof [Wed, 23 May 2018 22:00:45 +0000 (23:00 +0100)]
Update wikimedia/wrappedstring to v3.0.0

Notable changes:
- Remove back compat layer for WrappedString\ -> Wikimedia\.
- Improve merging of nested lists.

Depends-On: I89c015e638fe3e77ef12b88948d3cfa007afa7b0
Change-Id: I10cc2ed66e1d78a77fec7ffeafc75962f7d73090

5 years agobuild: Updating mediawiki/mediawiki-codesniffer to 18.0.0
libraryupgrader [Sat, 14 Apr 2018 10:27:27 +0000 (10:27 +0000)]
build: Updating mediawiki/mediawiki-codesniffer to 18.0.0

Change-Id: Id39e8dcf22262d1b3c57628467163a995fe4053b

5 years agoMerge "WatchAction::onSubmit return correct value, not always true"
jenkins-bot [Wed, 23 May 2018 21:48:14 +0000 (21:48 +0000)]
Merge "WatchAction::onSubmit return correct value, not always true"

5 years agoMerge "Setup: Remove various Profile sections"
jenkins-bot [Wed, 23 May 2018 21:39:39 +0000 (21:39 +0000)]
Merge "Setup: Remove various Profile sections"

5 years agoMerge "Update 'OpenSearchDescription' links"
jenkins-bot [Wed, 23 May 2018 21:38:28 +0000 (21:38 +0000)]
Merge "Update 'OpenSearchDescription' links"

5 years agoMerge "Add 'Special:MyLanguage' in Short URL link"
jenkins-bot [Wed, 23 May 2018 21:36:01 +0000 (21:36 +0000)]
Merge "Add 'Special:MyLanguage' in Short URL link"

5 years agoMerge "OutputPage: Remove appending of wgStyleVersion to legacy resources"
jenkins-bot [Wed, 23 May 2018 21:34:07 +0000 (21:34 +0000)]
Merge "OutputPage: Remove appending of wgStyleVersion to legacy resources"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 23 May 2018 20:00:37 +0000 (22:00 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I12af86ca297eae5af2e7c74fce0d198e6c473827

5 years agoOutputPage: Remove appending of wgStyleVersion to legacy resources
Timo Tijhof [Mon, 21 May 2018 21:21:28 +0000 (22:21 +0100)]
OutputPage: Remove appending of wgStyleVersion to legacy resources

For addScriptFile(), just remove the appending of wgStyleVersion.
Going forward, anyone still using this, should simply append a query
parameter themselves in a way that is specific to that one url
(instead of relying on a generic global variable). Alternatively, one
could use OutputPage::transformResourcePath if the file is in /w/.

For addStyles(), also remove the appending of wgStyleVersion. Since this
method takes paths relative to /w/skins, we can easily update this to
automatically use transformResourcePath(), so that file-hash based query
parameters are automatically added.

Test Plan:
* Add calls to top of OutputPage::output():
  `$this->addStyle( 'Vector/README.md' );`
  `$this->addScriptFile( "{$GLOBALS['wgScriptPath']}/composer.json" );`
* Before, they are both inserted as `<link>` (head) and `<script>` (body)
  with a query parameter based on wgStyleVersion.
* After, the `<script>` (end of body) has no query.
  After, the stylesheet (head) has a SHA1 content hash as query.

Bug: T181318
Change-Id: Ie5ab5066ef7d07279086bde838d7305e9e4eabaf

5 years agoWatchAction::onSubmit return correct value, not always true
Florian Schmidt [Fri, 18 May 2018 20:08:09 +0000 (22:08 +0200)]
WatchAction::onSubmit return correct value, not always true

The onSubmit method documentation states, that the caller can expect either
true for a successfull run, false if not tried and an array of error messages
in case of an failure. WatchAction however always returned false, even though
a Status object is availble with all needed information.

The behaviour of WatchAction::onSubmit is now changed to return the appropriate
value taken from the returned Status object of WatchAction::doSelf.

Also:
 * Added WatchAction test class to higher test coverage, especially for the
   static methods
 * Marked getUnwatchToken as deprecated, it's not used and a caller can easily
   switch to getWatchToken with "unwatch" as the action parameter

Change-Id: I2c1b91e1884a0d5f27f5e7ab9eafd6173642c21c

5 years agoMerge "Translate ApiHelp, ApiSandbox and Autoblocklist to Spanish"
jenkins-bot [Wed, 23 May 2018 18:15:40 +0000 (18:15 +0000)]
Merge "Translate ApiHelp, ApiSandbox and Autoblocklist to Spanish"

5 years agoMerge "resourceloader: Remove 'user.styles' dependency from 'user' module"
jenkins-bot [Wed, 23 May 2018 18:04:39 +0000 (18:04 +0000)]
Merge "resourceloader: Remove 'user.styles' dependency from 'user' module"

5 years agoMerge "OutputPage: Remove support for non-existent /w/skins/common directory"
jenkins-bot [Wed, 23 May 2018 18:01:11 +0000 (18:01 +0000)]
Merge "OutputPage: Remove support for non-existent /w/skins/common directory"

5 years agoMerge "Remove the unused 'jquery.farbtastic' module"
jenkins-bot [Wed, 23 May 2018 17:41:24 +0000 (17:41 +0000)]
Merge "Remove the unused 'jquery.farbtastic' module"

5 years agoMerge "Convert content.externallinks.css to less"
jenkins-bot [Wed, 23 May 2018 17:01:55 +0000 (17:01 +0000)]
Merge "Convert content.externallinks.css to less"

5 years agoRemove the unused 'jquery.farbtastic' module
Timo Tijhof [Wed, 23 May 2018 16:28:23 +0000 (17:28 +0100)]
Remove the unused 'jquery.farbtastic' module

This was added in (r99923; 4d8c7e96ed1f) while reviewing the
'gadget-preferences' branch in SVN of the Gadgets extension during
development of MediaWiki 1.18, intended for use in a color picker
on Special:Gadgets as part of an experimental feature that was
never completed (r94051).

The module has no usage anywhere in Wikimedia Git, nor in any
third-party hosted repos indexed by MediaWiki Codesearch, nor
anywhere on-wiki at WMF in site scripts (per mwgrep).

Bug: T193826
Bug: T192623
Change-Id: I8ed6c09dc7efd750ad4688b895b2e3f808a0e52b

5 years agoMerge "resourceloader: Remove mwLoadEnd code (moved to Navigation Timing)"
jenkins-bot [Wed, 23 May 2018 16:03:49 +0000 (16:03 +0000)]
Merge "resourceloader: Remove mwLoadEnd code (moved to Navigation Timing)"

5 years agoMerge "Translate special pages into Gorontalo"
jenkins-bot [Wed, 23 May 2018 15:58:38 +0000 (15:58 +0000)]
Merge "Translate special pages into Gorontalo"

5 years agoMerge "Crimean Tatar/crh transliteration odds and ends"
jenkins-bot [Wed, 23 May 2018 15:58:33 +0000 (15:58 +0000)]
Merge "Crimean Tatar/crh transliteration odds and ends"

5 years agoTranslate special pages into Gorontalo
Martin Urbanec [Wed, 25 Apr 2018 13:05:14 +0000 (15:05 +0200)]
Translate special pages into Gorontalo

Bug: T189128
Change-Id: Icb3685f4115c63fb5b50ce5429f564481d2cdfd6

5 years agoTranslate ApiHelp, ApiSandbox and Autoblocklist to Spanish
MarcoAurelio [Wed, 23 May 2018 15:07:31 +0000 (15:07 +0000)]
Translate ApiHelp, ApiSandbox and Autoblocklist to Spanish

Change-Id: Ie8cab864112cde17a5f5ced7645fff25c558abdf

5 years agoTranslate PasswordPolicies to Spanish
MarcoAurelio [Wed, 23 May 2018 14:55:01 +0000 (16:55 +0200)]
Translate PasswordPolicies to Spanish

New message added in Ifb4876f7

Change-Id: I621f81c023c4c1af4e33a4784ff7e1aca08df182

5 years agoresourceloader: Remove 'user.styles' dependency from 'user' module
Timo Tijhof [Wed, 23 May 2018 14:53:33 +0000 (15:53 +0100)]
resourceloader: Remove 'user.styles' dependency from 'user' module

Follows-up c3f200849b99721, which made isKnownEmpty() return false
for modules that have dependencies.

This had the side-effect of causing the 'user' module to be loaded
in its own HTTP request on all page views, even for logged-out users
and for registered users without scripts, because it has a dependency
on the 'user.styles' module.

This commit fixes that regression by removing the dependency so
that the 'user' module can, once again, be considered "empty".

The dependency isn't needed. It was only added for the transitional
period after the 'user' module was split up so that existing cached
views for logged-in users (in theory, e.g. 304 Not Modified) would
still trigger a load for the styles.

But that transition ended over a year ago. Now, both modules act
independently and are always queued separately, with user.styles
explicitly added as a style module (as it should be).

Even for the case of an AJAX preview (if it is somehow possible for
the 'user' module to not be loaded already), the API would respond
with a module list that contains both 'user' and 'user.styles'.

Bug: T195380
Change-Id: I9852516af1bd55c84a9213628c7796e2c2168745

5 years agoresourceloader: Remove mwLoadEnd code (moved to Navigation Timing)
Timo Tijhof [Tue, 22 May 2018 23:28:36 +0000 (00:28 +0100)]
resourceloader: Remove mwLoadEnd code (moved to Navigation Timing)

This internal hook was primarily added for the Navigation Timing
extension. As part of T192623, this should be removed from mediawiki.js
because:

* It is not used in anyway by core.
* It should not be used by anything other than Navigation Timing.
* It depends heavily on jQuery, which we don't want for mediawiki.js.

Bug: T192623
Depends-On: I011c9d1beebe6fa8d21ab9260da0a817ff7aa5f0
Change-Id: I0bf60d37ebea96f2a22044f9db221c87dd88521c

5 years agoIP: Fix sanitization of IPv4 ranges
Brad Jorsch [Tue, 22 May 2018 21:12:30 +0000 (17:12 -0400)]
IP: Fix sanitization of IPv4 ranges

'000.000.000.000/24' should sanitize to '0.0.0.0/24', not
'0.0.0.000/24'.

Change-Id: I9364cb268dcc9b9b24aa1c627a87482978c4cf34

5 years agoMerge "Only load PEAR Smtp mailer from vendor/composer, not from `pear` itself"
jenkins-bot [Wed, 23 May 2018 14:15:37 +0000 (14:15 +0000)]
Merge "Only load PEAR Smtp mailer from vendor/composer, not from `pear` itself"

5 years agoOnly load PEAR Smtp mailer from vendor/composer, not from `pear` itself
Chad Horohoe [Fri, 18 May 2018 01:56:00 +0000 (18:56 -0700)]
Only load PEAR Smtp mailer from vendor/composer, not from `pear` itself

Change-Id: I91c42a3eafd079039ddbc17a11ad3c7b6579e3c1

5 years agoMerge "ContentSecurityPolicy: Add trailing & to report urls"
jenkins-bot [Wed, 23 May 2018 11:22:12 +0000 (11:22 +0000)]
Merge "ContentSecurityPolicy: Add trailing & to report urls"

5 years agoConvert content.externallinks.css to less
Ed Sanders [Tue, 22 May 2018 20:01:59 +0000 (21:01 +0100)]
Convert content.externallinks.css to less

As suggested in the comment, since the blocking
bug was fixed 3.5 years ago.

Change-Id: I345f81ca5b9672c34525d223f01844df0a74f617

5 years agoMerge "PageDataRequestHandler: Use getHeader() instead of getAllHeaders()"
jenkins-bot [Wed, 23 May 2018 06:21:13 +0000 (06:21 +0000)]
Merge "PageDataRequestHandler: Use getHeader() instead of getAllHeaders()"

5 years agoPageDataRequestHandler: Use getHeader() instead of getAllHeaders()
Fomafix [Fri, 23 Feb 2018 08:58:11 +0000 (09:58 +0100)]
PageDataRequestHandler: Use getHeader() instead of getAllHeaders()

WebRequest has already the function getHeader to extract the requested
HTTP header.

Change-Id: Ifb63ce2ca8851cddf7e5e249509d60fd3620c3e7

5 years agoAvoid sorting the language array twice
Fomafix [Thu, 22 Feb 2018 21:09:04 +0000 (22:09 +0100)]
Avoid sorting the language array twice

Language::fetchLanguageNames returns already a sorted array. An
additional ksort is only needed when inserting a new value.

Change-Id: If8c7b16fa6e7dfe1545f72ac9c742a2f43eaee57

5 years agoMerge "installer: Do not wrongly hide namespace input field"
jenkins-bot [Wed, 23 May 2018 05:26:05 +0000 (05:26 +0000)]
Merge "installer: Do not wrongly hide namespace input field"

5 years agoMerge "Remove deprecated mediawiki.widgets.visibleByteLimit alias"
jenkins-bot [Wed, 23 May 2018 02:50:33 +0000 (02:50 +0000)]
Merge "Remove deprecated mediawiki.widgets.visibleByteLimit alias"

5 years agoMerge "Remove deprecated 'es5-shim' module"
jenkins-bot [Wed, 23 May 2018 02:43:17 +0000 (02:43 +0000)]
Merge "Remove deprecated 'es5-shim' module"

5 years agoMerge "mediawiki.debug: Move internal footHovzer to the same module"
jenkins-bot [Wed, 23 May 2018 02:43:13 +0000 (02:43 +0000)]
Merge "mediawiki.debug: Move internal footHovzer to the same module"

5 years agoMerge "API: Raise an error when too many values are passed"
jenkins-bot [Wed, 23 May 2018 02:20:38 +0000 (02:20 +0000)]
Merge "API: Raise an error when too many values are passed"

5 years agoRemove deprecated mediawiki.widgets.visibleByteLimit alias
Timo Tijhof [Mon, 21 May 2018 18:48:55 +0000 (19:48 +0100)]
Remove deprecated mediawiki.widgets.visibleByteLimit alias

Follows-up 777336288bc807a, which renamed the module in 1.31.
It was only used in a few places, which have been updated except
for MassMessage, which is updated with Id7612859dfba.

Depends-On: Id7612859dfbace9052f62df1c07595f85a75515b
Change-Id: I475fe6fef5b863b44895c201217a82ee18a020c6

5 years agoRemove deprecated 'es5-shim' module
Timo Tijhof [Sun, 20 May 2018 14:15:40 +0000 (16:15 +0200)]
Remove deprecated 'es5-shim' module

This is an empty placeholder module that does nothing, for
backwards compatibility with older extensions that were still
supporting MediaWiki versions from a time where ES3 was the
requirement and ES5 was shimmed. There is no longer any use
of 'es5-shim' anywhere in Wikimedia Git, nor on-wiki.

Bug: T192623
Change-Id: I143b89d3658ab83b98a1f201dd1f67a2d506fb09

5 years agomediawiki.debug: Move internal footHovzer to the same module
Timo Tijhof [Sun, 20 May 2018 13:25:40 +0000 (15:25 +0200)]
mediawiki.debug: Move internal footHovzer to the same module

This is an internal dev utility used by mediawiki.debug, not
used anywhere else, and probably wouldn't be supported even if
it was re-used somewhere, given it's custom made for mwdebug.

Bug: T192623
Change-Id: I086f7a1d06ab33d9dd9fc29fff27ddcdeb9a304b

5 years agoMake RCCacheEntry use the local part of the user name for linking
Amir Sarabadani [Tue, 24 Apr 2018 18:52:04 +0000 (20:52 +0200)]
Make RCCacheEntry use the local part of the user name for linking

Bug: T190530
Change-Id: Ib9e555c65fbe9befdb8413e6fbc3b3a53614bad8

5 years agoSetup: Remove various Profile sections
Timo Tijhof [Tue, 22 May 2018 13:35:21 +0000 (14:35 +0100)]
Setup: Remove various Profile sections

Before:
- Setup.php
- - Setup.php-defaults
- - Setup.php-validation
- - Setup.php-defaults2
- - Setup.php-misc1
- - Setup.php-memcached
- - Setup.php-globals
- - - Setup.php-session
- - Setup.php-extensions
- - - Setup.php-extensions-{extensionName}
- - - Setup.php-autocreate

After:
- Setup.php
- - Setup.php-defaults
- - Setup.php-defaults2
- - Setup.php-misc
- - Setup.php-globals
- - Setup.php-extensions

The removed sections are mainly things were essentially sections
consisting of one invocation, which profilers already track
natively.

Bug: T189966
Change-Id: I1ed648cdcca9e5a9ea7013394381eacd67f327a3

5 years agoContentSecurityPolicy: Add trailing & to report urls
Brian Wolff [Sat, 19 May 2018 09:30:17 +0000 (09:30 +0000)]
ContentSecurityPolicy: Add trailing & to report urls

This works around a bug in HHVM, where it treats post body as part of
request parameters, even if content-type is application/json.

See https://github.com/facebook/hhvm/issues/6676.

Change-Id: Id54d6657056dee56fc71100dedfb3b53d512eaba

5 years agojquery.tablesorter: Allow this module to load on mobile
jdlrobson [Mon, 7 May 2018 20:46:41 +0000 (13:46 -0700)]
jquery.tablesorter: Allow this module to load on mobile

If any special pages are loading this code, let it load.
Skins can disable this code if necessary (see Minerva for example)
In T111565 we will look to enabling this on the Minerva skin.

Bug: T111565
Change-Id: I837c16bdad7769f5cb4ce0bcfadb380b34c48bd4

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 22 May 2018 19:59:31 +0000 (21:59 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I01cfc16ecfe218fde89387a6d77333c0ed03dce8

5 years agoCrimean Tatar/crh transliteration odds and ends
tjones [Fri, 4 May 2018 15:34:32 +0000 (11:34 -0400)]
Crimean Tatar/crh transliteration odds and ends

* refactor '\b' into WB const to make it easy to update in the future
* add new ц-related exceptions

Bug: T193764
Change-Id: Ib707136f8f2598d1f8ec995bf129b436dfb53cd9

5 years agoMerge "Minor fixes to CRH language conversion."
jenkins-bot [Tue, 22 May 2018 18:47:13 +0000 (18:47 +0000)]
Merge "Minor fixes to CRH language conversion."

5 years agoMerge "mediawiki.page.gallery: Improve documentation"
jenkins-bot [Tue, 22 May 2018 18:18:41 +0000 (18:18 +0000)]
Merge "mediawiki.page.gallery: Improve documentation"

5 years agomediawiki.page.gallery: Improve documentation
Timo Tijhof [Mon, 21 May 2018 16:52:13 +0000 (17:52 +0100)]
mediawiki.page.gallery: Improve documentation

This file does a lot of things, but the header starts with
explaining a random/obscure thing it does with 4 lines of code
at the end of this large file.

Move that explanation near that actual code. Presumably it was
placed at the top because it used to be the only thing the
file was responsible for.

Change-Id: I75299a25dd8f5f4d4ab4cdc8fc90d74e6a74422c

5 years agoOutputPage: Remove support for non-existent /w/skins/common directory
Timo Tijhof [Mon, 21 May 2018 21:08:02 +0000 (22:08 +0100)]
OutputPage: Remove support for non-existent /w/skins/common directory

Test Plan:
* Add calls `$this->addScriptFile( 'example.js' )` and
  `$this->addScriptFile( '/example.js' )` to top of OutputPage::output().
* Without this change, two `<script>` are added.
* With this change, only for the latter a script is added,
  and the former triggers a deprecation warning.

Bug: T71277
Bug: T181318
Change-Id: I0576ef09fafa4ba34d52d75f4211fcfa28f4f3b0

5 years agoReplace HTTP by HTTPS
Fomafix [Sat, 2 Dec 2017 20:38:29 +0000 (21:38 +0100)]
Replace HTTP by HTTPS

* https://www.unicode.org/ instead of http://www.unicode.org/ or
  http://unicode.org/
* https://secure.php.net/ instead of http://www.php.net/ or
  http://php.net/
* https://hhvm.com/ instead of http://hhvm.com/
* https://www.iis.net/ instead of http://www.iis.net/

Change-Id: I84d818a7e0ced5ffb9485ec89a75efb28a77c1e0

5 years agoMerge "Job: Remove insert() and batchInsert(), deprecated since 1.21"
jenkins-bot [Tue, 22 May 2018 03:37:41 +0000 (03:37 +0000)]
Merge "Job: Remove insert() and batchInsert(), deprecated since 1.21"

5 years agoAPI: Raise an error when too many values are passed
Brad Jorsch [Fri, 18 May 2018 15:22:44 +0000 (17:22 +0200)]
API: Raise an error when too many values are passed

Since 2008 the API has truncated with a warning when too many values are
passed to a multi-valued parameter. It's long past time to make this an
error.

Bug: T41936
Change-Id: I0f9efbdf9230373fa0c175a7fcacbca68225cf40

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 21 May 2018 19:53:48 +0000 (21:53 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I2961ab68c20aadbbb601bb8191e06764be9ec443

5 years agoMerge "registration: Validate AutoloadNamespaces keys have trailing \"
jenkins-bot [Mon, 21 May 2018 19:28:51 +0000 (19:28 +0000)]
Merge "registration: Validate AutoloadNamespaces keys have trailing \"

5 years agoMerge "Use LinkRenderer instead of deprecated Linker in LogPage"
jenkins-bot [Mon, 21 May 2018 19:23:53 +0000 (19:23 +0000)]
Merge "Use LinkRenderer instead of deprecated Linker in LogPage"

5 years agoJob: Remove insert() and batchInsert(), deprecated since 1.21
James D. Forrester [Sun, 20 May 2018 12:10:20 +0000 (14:10 +0200)]
Job: Remove insert() and batchInsert(), deprecated since 1.21

Bug: T179624
Change-Id: I0d78a926c8c513fd652a424e8a51ded20e524a4a

5 years agoAdd support for Tachawit (Latin script) (shy-latn)
MarcoAurelio [Mon, 7 May 2018 16:02:41 +0000 (18:02 +0200)]
Add support for Tachawit (Latin script) (shy-latn)

Bug: T194047
Change-Id: If02515754857c224579519b94fe6fea27e1bd08f

5 years agoUse LinkRenderer instead of deprecated Linker in LogPage
Kunal Mehta [Sun, 20 May 2018 21:05:00 +0000 (14:05 -0700)]
Use LinkRenderer instead of deprecated Linker in LogPage

Change-Id: Ia31706cbbffd1d03916b6c087cc3a6b218e83fe6

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 20 May 2018 20:08:02 +0000 (22:08 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I0eb6cee336672321dd707f0fa84825f686fe65db

5 years agoregistration: Validate AutoloadNamespaces keys have trailing \
Kunal Mehta [Sun, 20 May 2018 19:13:05 +0000 (12:13 -0700)]
registration: Validate AutoloadNamespaces keys have trailing \

The PSR-4 autoloader requires "AutoloadNamespaces" keys to have a
trailing \ (\\ in JSON), so add a validation check for that.

Unfortunately the validation error isn't great, since it checks to see
if the property matches patternProperties, and when it doesn't, it
claims the property isn't defined since additionalProperties is false.
But it's still better than not failing when they are missing.

Bug: T189136
Change-Id: If01bd06cdd767fb704a8ff85cdf1c143e53fa4ca

5 years agoMerge "Don't require trailing slash in PSR-4 autoloader directory"
jenkins-bot [Sun, 20 May 2018 18:52:31 +0000 (18:52 +0000)]
Merge "Don't require trailing slash in PSR-4 autoloader directory"

5 years agoDon't require trailing slash in PSR-4 autoloader directory
Mark A. Hershberger [Sun, 20 May 2018 14:51:34 +0000 (10:51 -0400)]
Don't require trailing slash in PSR-4 autoloader directory

This avoids the confusing error “Fatal error: Uncaught
InvalidArgumentException” or similar.

Bug: T195211
Change-Id: Ifda59a26f8bd968a2d0acbdb157d81dc0bf6aab4

5 years agoMerge "API: Use User::getCanonicalName() when validating user names"
jenkins-bot [Sun, 20 May 2018 17:46:13 +0000 (17:46 +0000)]
Merge "API: Use User::getCanonicalName() when validating user names"

5 years agomediawiki.api: Merge modules into one
Timo Tijhof [Sun, 20 May 2018 13:39:47 +0000 (15:39 +0200)]
mediawiki.api: Merge modules into one

These are all quite tiny and not worth providing separately
to the system as deliverable file bundles.

Mark the other mediawiki.api.* modules as alias to 'mediawiki.api'
for back-compat, with deprecation warning.

Highlights:

* Change mediawiki.api.edit.js to not use mw.user, because that
  causes a circular dependency, given mw.user also depends on
  mediawiki.api.

Bug: T192623
Change-Id: I0afdc8ab50bc1354bb5099bf39923c07eab0b665

5 years agoMerge "filebackend: Fix undefined 'req_params' context in FileOperation log"
jenkins-bot [Sun, 20 May 2018 08:55:03 +0000 (08:55 +0000)]
Merge "filebackend: Fix undefined 'req_params' context in FileOperation log"

5 years agoMerge "resourceloader: Add test case for ResourceLoader::getLessCompiler"
jenkins-bot [Sun, 20 May 2018 08:50:48 +0000 (08:50 +0000)]
Merge "resourceloader: Add test case for ResourceLoader::getLessCompiler"

5 years agoMerge "registration: Perform extra validation for mediawiki.org URLs"
jenkins-bot [Sun, 20 May 2018 08:50:45 +0000 (08:50 +0000)]
Merge "registration: Perform extra validation for mediawiki.org URLs"

5 years agoReduce impact of revision day/month/year variables on edit stashing
Aaron Schulz [Sat, 24 Mar 2018 13:32:58 +0000 (06:32 -0700)]
Reduce impact of revision day/month/year variables on edit stashing

Change-Id: I0ddebdfa8a13844ab003aad577624e89daba7d6b

5 years agofilebackend: Fix undefined 'req_params' context in FileOperation log
Timo Tijhof [Sat, 19 May 2018 23:39:36 +0000 (01:39 +0200)]
filebackend: Fix undefined 'req_params' context in FileOperation log

Follows-up 9d49075b38. Noticed various log messages on Beta Cluster
from this code path that used "{params}" even in the real messages
(not normalised). Turned out, it isn't being defined due to a typo.

Change-Id: Ib9cf644fdf413035504d9d7486696cffa7737d4a

5 years agoregistration: Perform extra validation for mediawiki.org URLs
Kunal Mehta [Sat, 19 May 2018 20:05:08 +0000 (13:05 -0700)]
registration: Perform extra validation for mediawiki.org URLs

If the "url" field in extension.json is pointing to mediawiki.org,
perform some extra validation steps:
* Require HTTPS
* Require the `www.mediawiki.org` canonical domain

Change-Id: I3371443d3f6c76f53437adf90a700969bba7d0e7

5 years agoMerge "Re-enable MediaWiki.Usage.AssignmentInReturn.AssignmentInReturn sniff"
jenkins-bot [Sat, 19 May 2018 23:13:25 +0000 (23:13 +0000)]
Merge "Re-enable MediaWiki.Usage.AssignmentInReturn.AssignmentInReturn sniff"

5 years agoMerge "Re-enable MediaWiki.Usage.SuperGlobalsUsage.SuperGlobals sniff"
jenkins-bot [Sat, 19 May 2018 23:13:22 +0000 (23:13 +0000)]
Merge "Re-enable MediaWiki.Usage.SuperGlobalsUsage.SuperGlobals sniff"

5 years agoresourceloader: Add test case for ResourceLoader::getLessCompiler
Timo Tijhof [Sat, 19 May 2018 18:37:04 +0000 (20:37 +0200)]
resourceloader: Add test case for ResourceLoader::getLessCompiler

This was previously covered implicitly by an unrelated test.
Change that test (dependency.less) to use ../ to access the file
directly so that that test case is only about tracking dependencies
and testing the parser.

Then, add a second case that tests the use of import dirs.

Bug: T140807
Change-Id: Ie85abffe313922c03b3e146422f36b1d6a79743d

5 years agoMerge "Autofix MediaWiki.Commenting.FunctionComment.SpacingDoc* errors"
jenkins-bot [Sat, 19 May 2018 22:24:34 +0000 (22:24 +0000)]
Merge "Autofix MediaWiki.Commenting.FunctionComment.SpacingDoc* errors"

5 years agoRe-enable MediaWiki.Usage.AssignmentInReturn.AssignmentInReturn sniff
Kunal Mehta [Sat, 19 May 2018 21:52:00 +0000 (14:52 -0700)]
Re-enable MediaWiki.Usage.AssignmentInReturn.AssignmentInReturn sniff

...except in tests, where there's a pattern of using it in data
providers.

Change-Id: Iea15cd9c6046910b0c91044cd2aeaff1a40f4fc5

5 years agoRe-enable MediaWiki.Usage.SuperGlobalsUsage.SuperGlobals sniff
Kunal Mehta [Sat, 19 May 2018 21:41:41 +0000 (14:41 -0700)]
Re-enable MediaWiki.Usage.SuperGlobalsUsage.SuperGlobals sniff

Disable it in specific files and places where there are legitimate uses
to access $_GET and $_POST directly.

For EditPage, which wants to output $_POST for debugging information,
introduce WebRequest::getPostValues() as a wrapper, matching the
existing ::getQueryValues().

Change-Id: I2cb0a7012fb7ed29dcd720056b42f56508ddc5fa

5 years agoMerge "Re-enable Generic.Files.OneObjectStructurePerFile sniff"
jenkins-bot [Sat, 19 May 2018 21:26:35 +0000 (21:26 +0000)]
Merge "Re-enable Generic.Files.OneObjectStructurePerFile sniff"

5 years agoAutofix MediaWiki.Commenting.FunctionComment.SpacingDoc* errors
Kunal Mehta [Sat, 19 May 2018 20:46:54 +0000 (13:46 -0700)]
Autofix MediaWiki.Commenting.FunctionComment.SpacingDoc* errors

Change-Id: I63761ebce04c03b9b13237919c27cc10180f198f

5 years agoRe-enable Generic.Files.OneObjectStructurePerFile sniff
Kunal Mehta [Mon, 7 May 2018 08:53:28 +0000 (01:53 -0700)]
Re-enable Generic.Files.OneObjectStructurePerFile sniff

Whitelist existing violations in .phpcs.xml, and enable the sniff to
prevent people from accidentally introducing new violations.

languages/ is blanket exempted since languages that have language
converters tend to have two classes in one file.

tests/ is also blanket exempted since many tests create mock classes,
and we don't care about PSR-4 compliance in tests.

Change-Id: I56be2f23bae3e24c062198b766cb48edab5e395e

5 years agoresourceloader: Apply safemode to startup module registry
Timo Tijhof [Wed, 28 Mar 2018 00:57:06 +0000 (17:57 -0700)]
resourceloader: Apply safemode to startup module registry

This effectively applies safemode to the mw.loader client,
without the client itself needing specific knowledge of safemode.

Test Plan:
* Unchanged: When viewing a page in safemode, the 'user' and
  'site' modules are still not queued by OutputPage.
* New: mw.loader.getState('site'), previously would yield
  'registered', but will now yield null.
* New: mw.loader.load('site'), previously loaded the module,
  it now logs a dependency warning for unknown module, like for
  any other unknown module.
* New: mw.loader.using('site'), previously resolved, it is now
  rejected.

Bug: T185303
Change-Id: I672e3891c8e1b3c2d13655fa134d0f1d031b8247

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 19 May 2018 20:01:55 +0000 (22:01 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ia5116d3301606e7672799523c838bb598e7d3b66

5 years agoMerge "Document nodata for HTMLFormFields"
jenkins-bot [Sat, 19 May 2018 14:17:57 +0000 (14:17 +0000)]
Merge "Document nodata for HTMLFormFields"

5 years agoDocument nodata for HTMLFormFields
Florian Schmidt [Mon, 23 Jan 2017 19:30:36 +0000 (20:30 +0100)]
Document nodata for HTMLFormFields

This could be a useful feature for users of HTMLForm, so they should be
able to know about it.

Bug: T156056
Change-Id: Ib444051e38292c06ebe370465b7c751e136d42b2

5 years agoMerge "Change a.external padding from 15px to 13px to match Vector"
jenkins-bot [Sat, 19 May 2018 13:16:16 +0000 (13:16 +0000)]
Merge "Change a.external padding from 15px to 13px to match Vector"

5 years agoMerge "resourceloader: Simplify mwLoadEnd hook implementation"
jenkins-bot [Sat, 19 May 2018 12:19:38 +0000 (12:19 +0000)]
Merge "resourceloader: Simplify mwLoadEnd hook implementation"

5 years agoMerge "makeCollapsible: Remove animations"
jenkins-bot [Sat, 19 May 2018 12:09:28 +0000 (12:09 +0000)]
Merge "makeCollapsible: Remove animations"

5 years agoMerge "Add ct_tag_id field to change_tag table"
jenkins-bot [Sat, 19 May 2018 11:56:57 +0000 (11:56 +0000)]
Merge "Add ct_tag_id field to change_tag table"

5 years agomakeCollapsible: Remove animations
Derk-Jan Hartman [Sat, 19 May 2018 11:12:18 +0000 (13:12 +0200)]
makeCollapsible: Remove animations

The animations are:
* not well liked
* non-configurable (in presence and time)
* bad for performance
* javascript based instead of CSS

Removing them allows us to make it easier to replace NavFrame and
collapsible as deployed by the communities, and will be better for
mobile use as well.

Bug: T195049
Change-Id: I5eb505d1bd2097fe5d98db47293583e7225310de

5 years agoresourceloader: Simplify mwLoadEnd hook implementation
Timo Tijhof [Mon, 7 May 2018 21:57:40 +0000 (22:57 +0100)]
resourceloader: Simplify mwLoadEnd hook implementation

In addition to the high overhead of $.Deferred per-module in
mw.loader.using(), this was also using $.when() and another
Deferred in catch() for casting.

The handler for marking mwLoadEnd needs a Promise in our fallback
for compatibility with the original using() call. But the code
within our fallback does not need to use N promises, for that
we can simply use a counter that we decrement, given we only need
to worry about completion.

So basically, use `Deferred#always(callback)`
instead of `Deferred.catch(=>Defered().resolve)).then(callback)`.

This is in preparation for moving the code to NavigationTiming.

Change-Id: I20514d3fe680fc9384a0f7ce0880652970d86856