lhc/web/wiklou.git
5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 15 Apr 2019 20:11:57 +0000 (22:11 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ida17cce17aa1b580a88aa9c767362e739364d1e3

5 years agoMerge "specials: Add $subpage param to RedirectSpecialPage::getRedirectQuery"
jenkins-bot [Mon, 15 Apr 2019 19:34:24 +0000 (19:34 +0000)]
Merge "specials: Add $subpage param to RedirectSpecialPage::getRedirectQuery"

5 years agoMerge "db: Use $fname instead of __METHOD__ magic constant"
jenkins-bot [Mon, 15 Apr 2019 19:31:17 +0000 (19:31 +0000)]
Merge "db: Use $fname instead of __METHOD__ magic constant"

5 years agoMerge "specials: Remove invalid return from RedirectSpecialPage::execute"
jenkins-bot [Mon, 15 Apr 2019 19:19:40 +0000 (19:19 +0000)]
Merge "specials: Remove invalid return from RedirectSpecialPage::execute"

5 years agoMerge "Fix calls to Title::getUserPermissionsErrors on SpecialImport"
jenkins-bot [Mon, 15 Apr 2019 19:13:58 +0000 (19:13 +0000)]
Merge "Fix calls to Title::getUserPermissionsErrors on SpecialImport"

5 years agoMerge "resourceloader: Remove needless MW-specific fallback"
jenkins-bot [Mon, 15 Apr 2019 18:58:25 +0000 (18:58 +0000)]
Merge "resourceloader: Remove needless MW-specific fallback"

5 years agoMerge "parser: use "-" for revision ID for non-preview edit filter parse during save"
jenkins-bot [Mon, 15 Apr 2019 18:42:22 +0000 (18:42 +0000)]
Merge "parser: use "-" for revision ID for non-preview edit filter parse during save"

5 years agoresourceloader: Remove needless MW-specific fallback
Timo Tijhof [Thu, 11 Apr 2019 22:17:00 +0000 (23:17 +0100)]
resourceloader: Remove needless MW-specific fallback

This is never used by the mw.loader client code. For any
manually crafted requests or fringe usage where the load.php
might be used to fetch some raw JS code that doesn't vary by
language or skin, proceed with qqx/fallback.

In the future load.php might deny these requests and then we
could make this a constructor parameter to ResourceLoaderContext.

Bug: T32956
Change-Id: I4e4ee758cd22278cea9592d4745b4f7fc00e0add

5 years agoMerge "selenium: Replace regex matching with includes()"
jenkins-bot [Mon, 15 Apr 2019 17:30:47 +0000 (17:30 +0000)]
Merge "selenium: Replace regex matching with includes()"

5 years agoMerge "ContibsPager: Fix slow query with actor migration read-new mode"
jenkins-bot [Mon, 15 Apr 2019 17:28:52 +0000 (17:28 +0000)]
Merge "ContibsPager: Fix slow query with actor migration read-new mode"

5 years agoselenium: Replace regex matching with includes()
Cormac Parle [Fri, 12 Apr 2019 09:57:46 +0000 (10:57 +0100)]
selenium: Replace regex matching with includes()

Bug: T217544
Change-Id: Iedcbb1f7e21fc768069346ac346c2e499a689556

5 years agoContibsPager: Fix slow query with actor migration read-new mode
Brad Jorsch [Mon, 15 Apr 2019 14:41:03 +0000 (10:41 -0400)]
ContibsPager: Fix slow query with actor migration read-new mode

The change in I1678f7ec broke the workaround in I992aa50f by adding
the rev_id column to the ORDER BY clause. We need to extend the aliasing
to rev_id => revactor_rev to re-fix it.

Bug: T220991
Change-Id: I62dc3803621da982e526d7402ab8e7b08f8336bc

5 years agoMerge "resourceloader: Re-use internal addLink() for mw.loader.load()"
jenkins-bot [Mon, 15 Apr 2019 16:08:53 +0000 (16:08 +0000)]
Merge "resourceloader: Re-use internal addLink() for mw.loader.load()"

5 years agoMerge "JsonContent: Add missing prefix to selector"
jenkins-bot [Mon, 15 Apr 2019 15:25:52 +0000 (15:25 +0000)]
Merge "JsonContent: Add missing prefix to selector"

5 years agodb: Use $fname instead of __METHOD__ magic constant
Derick Alangi [Mon, 15 Apr 2019 15:05:31 +0000 (16:05 +0100)]
db: Use $fname instead of __METHOD__ magic constant

The insert() method calls insertOneRow() method on line 391. It then
passes $fname which defaults to __METHOD__ in its function header and
not using $fname instead of __METHOD__ in insertOneRow() method makes
this parameter unused which of course should be used.

Change-Id: Ic5f5ee878e4f919a96900ba88755641ac85929df

5 years agospecials: Remove invalid return from RedirectSpecialPage::execute
Timo Tijhof [Sat, 6 Apr 2019 00:34:56 +0000 (01:34 +0100)]
specials: Remove invalid return from RedirectSpecialPage::execute

Follows-up f739a8f368a, and 22c9aa5ec07.

The execute() method here should generally be void, with the
exception of includable special pages, where the return value
is a string of HTML.

This was likely left-over early iteration of commit f739a8f368a,
which ended up returning from getRedirect() instead.

Change-Id: I68715910114e19a0421625e814fd8881068f6406

5 years agospecials: Add $subpage param to RedirectSpecialPage::getRedirectQuery
Timo Tijhof [Sat, 6 Apr 2019 00:50:55 +0000 (01:50 +0100)]
specials: Add $subpage param to RedirectSpecialPage::getRedirectQuery

This will make it easier to create redirects where $subpage is the title,
e.g. "Special:Example/Foo?x=y" to "index.php?title=Foo&x=y".

To do that conveniently, getRedirectQuery() needs access to $subpage.
The alternative is to do Title-parsing inside getRedirect(), which then
complicates this significantly as one has to deal with absence of a title
(null) and invalid titles (illegal chars etc.).

By using it plainly as query parameter (defaulting to null/omitted), this
is all deferred to index.php, which seems like a better separation of
concerns.

Motivated by SpecialMobileHistory in MobileFrontend (Ic0aea7ee340a).

Change-Id: I9fe78f479053fb55952ba78850d2fc281a039fe3

5 years agoFix calls to Title::getUserPermissionsErrors on SpecialImport
Amir Sarabadani [Mon, 15 Apr 2019 14:42:21 +0000 (16:42 +0200)]
Fix calls to Title::getUserPermissionsErrors on SpecialImport

Right now, it uses a deprecated way to set rigor causing it to read from
master on GET, giving out errors

Change-Id: I89bbe20080998bde2156680c631700b52f4e4712

5 years agofilebackend: move more files to subdirectories
Aaron Schulz [Mon, 15 Apr 2019 09:30:24 +0000 (02:30 -0700)]
filebackend: move more files to subdirectories

Change-Id: If965323809c5bfc9cb73ed0f357233d9325d3353

5 years agoMerge "Cache: Make APCUBagOStuff::set return a useful value"
jenkins-bot [Mon, 15 Apr 2019 03:20:28 +0000 (03:20 +0000)]
Merge "Cache: Make APCUBagOStuff::set return a useful value"

5 years agoMerge "Split DairikiDiff to class per file"
jenkins-bot [Mon, 15 Apr 2019 03:01:00 +0000 (03:01 +0000)]
Merge "Split DairikiDiff to class per file"

5 years agoJsonContent: Add missing prefix to selector
Ed Sanders [Fri, 12 Apr 2019 19:45:35 +0000 (20:45 +0100)]
JsonContent: Add missing prefix to selector

Change-Id: I977f6c565b93949a310d1207411f893cf83af996

5 years agoMerge "selenium: Disable flaky wdio rollback tests that rely on pauses"
jenkins-bot [Sun, 14 Apr 2019 22:54:05 +0000 (22:54 +0000)]
Merge "selenium: Disable flaky wdio rollback tests that rely on pauses"

5 years agoMerge "Restore func_get_args in HTMLFormField"
jenkins-bot [Sun, 14 Apr 2019 22:47:28 +0000 (22:47 +0000)]
Merge "Restore func_get_args in HTMLFormField"

5 years agoSplit DairikiDiff to class per file
Reedy [Sun, 14 Apr 2019 22:13:01 +0000 (23:13 +0100)]
Split DairikiDiff to class per file

Change-Id: Ica426312ec69707b9a99dfe2a7deee945c38ba35

5 years agoMerge "Split filebackend files to class per file"
jenkins-bot [Sun, 14 Apr 2019 22:24:56 +0000 (22:24 +0000)]
Merge "Split filebackend files to class per file"

5 years agoselenium: Disable flaky wdio rollback tests that rely on pauses
Timo Tijhof [Sun, 14 Apr 2019 22:12:53 +0000 (23:12 +0100)]
selenium: Disable flaky wdio rollback tests that rely on pauses

Wait for an actual state to be reached, whether a JavaScript
expression to become true, or a certain state in the DOM.

Using pauses is an anti-pattern and inherently unstable.

Bug: T219440
Change-Id: Ibb2bd335f12442ab8ec2973031454cb58733211d

5 years agoRename PhpBugTests -> PhpXMLBugTester
Reedy [Sun, 14 Apr 2019 21:10:40 +0000 (22:10 +0100)]
Rename PhpBugTests -> PhpXMLBugTester

Only contains one class (probably should be removed when we bump to PHP 7 fully)

Change-Id: Iab2bb837e2ed5d5556bd49f4236030b43aba29f1

5 years agoSplit filebackend files to class per file
Reedy [Sun, 14 Apr 2019 02:35:00 +0000 (03:35 +0100)]
Split filebackend files to class per file

Change-Id: Idf9f4177fb9a523ce41227bda2af923bf418396b

5 years agoMerge "Split HTMLFormElement.php into class per file"
jenkins-bot [Sun, 14 Apr 2019 21:59:45 +0000 (21:59 +0000)]
Merge "Split HTMLFormElement.php into class per file"

5 years agoMerge "Move ClassCollector to its own file"
jenkins-bot [Sun, 14 Apr 2019 21:54:10 +0000 (21:54 +0000)]
Merge "Move ClassCollector to its own file"

5 years agoMerge "Move SectionProfileCallback to its own file"
jenkins-bot [Sun, 14 Apr 2019 21:53:00 +0000 (21:53 +0000)]
Merge "Move SectionProfileCallback to its own file"

5 years agoMerge "DevelopmentSettings: Remove unused globals & declare $wgSQLMode"
jenkins-bot [Sun, 14 Apr 2019 21:40:23 +0000 (21:40 +0000)]
Merge "DevelopmentSettings: Remove unused globals & declare $wgSQLMode"

5 years agoMerge "Remove XMPReader back compat"
jenkins-bot [Sun, 14 Apr 2019 21:25:47 +0000 (21:25 +0000)]
Merge "Remove XMPReader back compat"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 14 Apr 2019 20:01:17 +0000 (22:01 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: If213bbbe7552c4a6e747ca618ac0be22177d70b9

5 years agoMove ClassCollector to its own file
Reedy [Sun, 14 Apr 2019 15:04:32 +0000 (16:04 +0100)]
Move ClassCollector to its own file

Change-Id: I881f1ccc4aaf8babc40ad534a2a91f1ccf3baad4

5 years agoMove SectionProfileCallback to its own file
Reedy [Sun, 14 Apr 2019 15:02:53 +0000 (16:02 +0100)]
Move SectionProfileCallback to its own file

Change-Id: Iccb2048eed6631caa4f20639f55866e76f9fabf0

5 years agoMerge "Fix casing of Special Pages to match class name"
jenkins-bot [Sun, 14 Apr 2019 19:25:29 +0000 (19:25 +0000)]
Merge "Fix casing of Special Pages to match class name"

5 years agoMerge "Remove HWLDFWordAccumulator, deprecated in 1.28"
jenkins-bot [Sun, 14 Apr 2019 19:21:26 +0000 (19:21 +0000)]
Merge "Remove HWLDFWordAccumulator, deprecated in 1.28"

5 years agoMerge "Remove ObjectFactory"
jenkins-bot [Sun, 14 Apr 2019 19:21:21 +0000 (19:21 +0000)]
Merge "Remove ObjectFactory"

5 years agoRemove XMPReader back compat
Reedy [Sun, 14 Apr 2019 13:55:23 +0000 (14:55 +0100)]
Remove XMPReader back compat

Change-Id: I4e3ecbf6c13a7e7cfed88253eb6820e78e49e9c3

5 years agoCache: Make APCUBagOStuff::set return a useful value
Daimona Eaytoy [Sun, 14 Apr 2019 17:13:48 +0000 (19:13 +0200)]
Cache: Make APCUBagOStuff::set return a useful value

It took me lots of time to debug a CI failure in
I9b3bc36b552901bc6ca7609ee51e80be2979a9c4. I was deceived by
$cache->set returning true, which according to the docs means that the
store was successful. But instead, this function just returns true, even
in case of failure. Make it return the result of apcu_store, which is
already in the format true = success, false = failure.

Change-Id: I2619845c12460e1acb5af696d2c11a5a4dee1bd3

5 years agoSplit StubObject.php to have one class in one file
Zoranzoki21 [Sun, 14 Apr 2019 10:15:06 +0000 (12:15 +0200)]
Split StubObject.php to have one class in one file

Change-Id: If00625b700962a1c6d6412c6de30c28fa3df9f81

5 years agoRemove HWLDFWordAccumulator, deprecated in 1.28
Reedy [Sun, 14 Apr 2019 13:52:41 +0000 (14:52 +0100)]
Remove HWLDFWordAccumulator, deprecated in 1.28

Change-Id: I1eb6ba3c4b8b4cbabf26033a27728e42ebcddb23

5 years agoRemove ObjectFactory
Reedy [Sun, 14 Apr 2019 13:48:08 +0000 (14:48 +0100)]
Remove ObjectFactory

Change-Id: Ibfdb55101c893a6724e1f999eba85f2f8eabb79b

5 years agoRestore func_get_args in HTMLFormField
Umherirrender [Sun, 14 Apr 2019 13:01:20 +0000 (15:01 +0200)]
Restore func_get_args in HTMLFormField

Mocking variadic arguments does not work in hhvm

Follow-Up: I066ec95a7beb7c0665146195a08e7cce1222c788
Change-Id: Ic3b689d003a4659abdc4c9344ffd83f24f448912

5 years agoFix casing of Special Pages to match class name
Reedy [Sun, 14 Apr 2019 12:32:59 +0000 (13:32 +0100)]
Fix casing of Special Pages to match class name

Change-Id: Ifc9e827202493e8f055a21875c54ff827a38d1f7

5 years agoSplit HTMLFormElement.php into class per file
Reedy [Sun, 14 Apr 2019 02:40:03 +0000 (03:40 +0100)]
Split HTMLFormElement.php into class per file

Change-Id: Ia8a35056fa6df5b81cda3e5bfcaac91d0b898d51

5 years agoSplit LocalFile.php to have one class in one file
Umherirrender [Sat, 6 Apr 2019 10:02:26 +0000 (12:02 +0200)]
Split LocalFile.php to have one class in one file

Change-Id: Ic8e5220f2a1832dfc39f00720001235429ed2cab

5 years agoMerge "resourceloader: Switch params for private addLink() function"
jenkins-bot [Sun, 14 Apr 2019 07:57:41 +0000 (07:57 +0000)]
Merge "resourceloader: Switch params for private addLink() function"

5 years agoMerge "Move UploadStashFile to its own file"
jenkins-bot [Sun, 14 Apr 2019 06:44:33 +0000 (06:44 +0000)]
Merge "Move UploadStashFile to its own file"

5 years agoMerge "Fix return type of UploadStashFile::remove()"
jenkins-bot [Sun, 14 Apr 2019 06:44:05 +0000 (06:44 +0000)]
Merge "Fix return type of UploadStashFile::remove()"

5 years agoMerge "title: Allow passing MessageLocalizer to newMainPage()"
jenkins-bot [Sun, 14 Apr 2019 02:52:22 +0000 (02:52 +0000)]
Merge "title: Allow passing MessageLocalizer to newMainPage()"

5 years agoMove UploadStashFile to its own file
Reedy [Sun, 14 Apr 2019 02:50:59 +0000 (03:50 +0100)]
Move UploadStashFile to its own file

Change-Id: I557bcd8369014bf2ea43c5eb8336562cb6295890

5 years agoFix return type of UploadStashFile::remove()
Reedy [Sun, 14 Apr 2019 02:48:43 +0000 (03:48 +0100)]
Fix return type of UploadStashFile::remove()

Change-Id: Ib9da5827671a34798b58f7d736e4b663ac2c442d

5 years agoMerge "Split logging classes to individual files"
jenkins-bot [Sun, 14 Apr 2019 02:26:45 +0000 (02:26 +0000)]
Merge "Split logging classes to individual files"

5 years agotitle: Allow passing MessageLocalizer to newMainPage()
Timo Tijhof [Sat, 13 Apr 2019 03:27:31 +0000 (04:27 +0100)]
title: Allow passing MessageLocalizer to newMainPage()

The method could not be used in session-less endpoints. This was
worked around once in the Startup module.

I plan to use this method in an extension module as well,
and would prefer not to duplicate core's logic for determining
the main page, outside this repository.

As general dependency-injection pattern, it seems desirable
to allow injecting a MessageLocalizer here.

Change-Id: I76cd02b2f489882e9404b93270f76aad9f0a4d9d

5 years agoMerge "Remove PreferencesFormLegacy.php"
jenkins-bot [Sun, 14 Apr 2019 02:22:08 +0000 (02:22 +0000)]
Merge "Remove PreferencesFormLegacy.php"

5 years agoMerge "Avoid extra parse/save delay for users with non-canonical parser options"
jenkins-bot [Sun, 14 Apr 2019 02:13:54 +0000 (02:13 +0000)]
Merge "Avoid extra parse/save delay for users with non-canonical parser options"

5 years agoSplit logging classes to individual files
Reedy [Sun, 14 Apr 2019 01:05:34 +0000 (02:05 +0100)]
Split logging classes to individual files

Change-Id: I3eaaf23612fe1aed65e49c06a9e5e565399af9ce

5 years agoRemove PreferencesFormLegacy.php
Reedy [Sun, 14 Apr 2019 01:24:20 +0000 (02:24 +0100)]
Remove PreferencesFormLegacy.php

Now unused, deprecated in 1.32

Change-Id: I4fc4bdf36b3832786c0266786cff57d512140d8e

5 years agoAvoid extra parse/save delay for users with non-canonical parser options
Aaron Schulz [Fri, 26 Oct 2018 22:42:26 +0000 (15:42 -0700)]
Avoid extra parse/save delay for users with non-canonical parser options

If {{REVISIONID}} results in a re-parse, that re-parse will be post-send
unless the user has canonical parser options and will need the output for
page views anyway (e.g. the refresh after editing).

Also make getPreparedEdit() allow lazy-loading of the parser output via
a callback. A magic __get() method handles objects created the new way
but accessed by other code the old way.

Bug: T216306
Change-Id: I2012437c45dd605a6c0868dea47cf43dc67061d8

5 years agoRemove unused constructor parameter and unused member variables
Reedy [Sun, 14 Apr 2019 01:36:34 +0000 (02:36 +0100)]
Remove unused constructor parameter and unused member variables

Make member variables private

Change-Id: Ie76f30a5c5731529256b2b160f6dde4d49646545

5 years agochanges: Remove unused code from ChangesFeed.php
Timo Tijhof [Sat, 13 Apr 2019 23:03:46 +0000 (00:03 +0100)]
changes: Remove unused code from ChangesFeed.php

This class is only constructed by ApiFeedRecentchanges, which
only calls either '$feed->getFeedObject' or '::buildItems',
neither of which call into the remaining methods on this class.

Appears to be a left over from an old refactor, perhaps from
when it was split out into FeedItem/ChannelFeed etc.

Change-Id: I89e13af992fd091d714d6f74735f03a5bfe9d238

5 years agoMerge "Replace PreferencesFormLegacy usages with PreferencesFormOOUI"
jenkins-bot [Sun, 14 Apr 2019 01:10:32 +0000 (01:10 +0000)]
Merge "Replace PreferencesFormLegacy usages with PreferencesFormOOUI"

5 years agoMerge "Remove LoginSignupSpecialPage.php from OneObjectStructurePerFile.MultipleFound"
jenkins-bot [Sun, 14 Apr 2019 01:10:26 +0000 (01:10 +0000)]
Merge "Remove LoginSignupSpecialPage.php from OneObjectStructurePerFile.MultipleFound"

5 years agoReplace PreferencesFormLegacy usages with PreferencesFormOOUI
Reedy [Sun, 14 Apr 2019 00:43:33 +0000 (01:43 +0100)]
Replace PreferencesFormLegacy usages with PreferencesFormOOUI

Change-Id: I4fc2a609ebb0f93b0767dddc343c3ff93ca8a39c

5 years agoRemove LoginSignupSpecialPage.php from OneObjectStructurePerFile.MultipleFound
Reedy [Sun, 14 Apr 2019 00:38:27 +0000 (01:38 +0100)]
Remove LoginSignupSpecialPage.php from OneObjectStructurePerFile.MultipleFound

Change-Id: I145759b29d9e845d175cc7ac43ad72248b258df0

5 years agoSplit SVGReader to its own file
Reedy [Sun, 14 Apr 2019 00:07:50 +0000 (01:07 +0100)]
Split SVGReader to its own file

Change-Id: I9fc442225a37c14d0606508aed5ef496a5ad82ba

5 years agoMerge "Split ApiImport.php to have one class in one file"
jenkins-bot [Sun, 14 Apr 2019 00:29:32 +0000 (00:29 +0000)]
Merge "Split ApiImport.php to have one class in one file"

5 years agoMerge "Remove PathRouter.php from Generic.Files.OneObjectStructurePerFile.MultipleFound"
jenkins-bot [Sun, 14 Apr 2019 00:20:32 +0000 (00:20 +0000)]
Merge "Remove PathRouter.php from Generic.Files.OneObjectStructurePerFile.MultipleFound"

5 years agoSplit ApiImport.php to have one class in one file
Zoranzoki21 [Sat, 6 Apr 2019 12:24:57 +0000 (14:24 +0200)]
Split ApiImport.php to have one class in one file

Change-Id: I3fbf5d271585722e95b7966ba62dd5e16fa3623f

5 years agoresourceloader: Re-use internal addLink() for mw.loader.load()
Timo Tijhof [Sun, 14 Apr 2019 00:00:25 +0000 (01:00 +0100)]
resourceloader: Re-use internal addLink() for mw.loader.load()

Change-Id: Ibe4e1339fd99c75657114b69a196ab2c92e63b11

5 years agoresourceloader: Switch params for private addLink() function
Timo Tijhof [Sat, 13 Apr 2019 23:43:18 +0000 (00:43 +0100)]
resourceloader: Switch params for private addLink() function

I don't recall how this awkward parameter order came about,
but it easy to change given it is a private function.

Switching the order makes it cleaner to then internally re-use
for mw.loader.load() which currently contains a duplicate version
of this logic.

Change-Id: Id686389991315c3d05222f8fd0b69f93f65e9924

5 years agoRemove PathRouter.php from Generic.Files.OneObjectStructurePerFile.MultipleFound
Reedy [Sun, 14 Apr 2019 00:01:52 +0000 (01:01 +0100)]
Remove PathRouter.php from Generic.Files.OneObjectStructurePerFile.MultipleFound

Change-Id: I9aa1eb7903dca3f63675c3be5a597829dc6d9ab3

5 years agoRemove ApiMessage from Generic.Files.OneObjectStructurePerFile.MultipleFound
Reedy [Sat, 13 Apr 2019 23:22:15 +0000 (00:22 +0100)]
Remove ApiMessage from Generic.Files.OneObjectStructurePerFile.MultipleFound

Change-Id: Ib1a08c53f509bdae96ff8d3a5dadc9a55eb6b6af

5 years agoMerge "Fix a couple of Generic.Files.OneObjectStructurePerFile.MultipleFound in api"
jenkins-bot [Sat, 13 Apr 2019 23:49:50 +0000 (23:49 +0000)]
Merge "Fix a couple of Generic.Files.OneObjectStructurePerFile.MultipleFound in api"

5 years agoMerge "changes: Split Feed.php into a class per file"
jenkins-bot [Sat, 13 Apr 2019 23:49:44 +0000 (23:49 +0000)]
Merge "changes: Split Feed.php into a class per file"

5 years agoparser: use "-" for revision ID for non-preview edit filter parse during save
Aaron Schulz [Sat, 13 Apr 2019 23:43:06 +0000 (16:43 -0700)]
parser: use "-" for revision ID for non-preview edit filter parse during save

This avoids a double parse when the edit stash is not used,
which can be confirmed via the SaveParse log for a page
using {{REVISIONID}} when edit stashing is disabled. This
now matches the reuse for the edit stash hit case.

Change-Id: I405c39d4d7ac04e39fbdfe400f73238b734c7833

5 years agoFix a couple of Generic.Files.OneObjectStructurePerFile.MultipleFound in api
Reedy [Sat, 13 Apr 2019 23:27:04 +0000 (00:27 +0100)]
Fix a couple of Generic.Files.OneObjectStructurePerFile.MultipleFound in api

Change-Id: Ibb6b324b286f62153ce5d08a66454e0b05a0ef78

5 years agoMerge "HistoryAction: Consider 'feed=' and 'feed=0' as invalid feed actions"
jenkins-bot [Sat, 13 Apr 2019 23:32:28 +0000 (23:32 +0000)]
Merge "HistoryAction: Consider 'feed=' and 'feed=0' as invalid feed actions"

5 years agochanges: Split Feed.php into a class per file
Timo Tijhof [Sat, 13 Apr 2019 22:56:06 +0000 (23:56 +0100)]
changes: Split Feed.php into a class per file

Change-Id: I1f11a52871dcb249b3ba790e484dd10fe8bb049f

5 years agoHistoryAction: Consider 'feed=' and 'feed=0' as invalid feed actions
Timo Tijhof [Sat, 13 Apr 2019 22:43:14 +0000 (23:43 +0100)]
HistoryAction: Consider 'feed=' and 'feed=0' as invalid feed actions

Previously it did a PHP truthy check, which is unrelated to the
check in question and outside its responsibility to do.

The validation of the value happens inside HistoryAction::feed
and more specifically in FeedUtils::checkFeedOutput().

Also remove needless use of unicode normalization as this only
accepts exact pre-configured presets. Those presets are linked
by the sidebar and thus never considered user or otherwise
in need of any normalization.

Change-Id: Id68a753bb5a5f03f983f5b813a42e784cf91e8c9

5 years agoMerge "registration: Allow to require environment abilities"
jenkins-bot [Sat, 13 Apr 2019 19:54:04 +0000 (19:54 +0000)]
Merge "registration: Allow to require environment abilities"

5 years agoMerge "installer: Remove TODO per discussion in Ia9f0cd7d0117f67d2017e"
jenkins-bot [Sat, 13 Apr 2019 19:06:02 +0000 (19:06 +0000)]
Merge "installer: Remove TODO per discussion in Ia9f0cd7d0117f67d2017e"

5 years agoresourceloader: Add newline after 'mw.loader.implement()' in debug mode
Fomafix [Sun, 7 Apr 2019 09:12:04 +0000 (11:12 +0200)]
resourceloader: Add newline after 'mw.loader.implement()' in debug mode

The next mw.loader.implement() starts on its own line.

Change-Id: Iae0a5eab58f1065c354018ed23c6a9834973b19d

5 years agoinstaller: Remove TODO per discussion in Ia9f0cd7d0117f67d2017e
Derick Alangi [Sat, 13 Apr 2019 18:01:35 +0000 (19:01 +0100)]
installer: Remove TODO per discussion in Ia9f0cd7d0117f67d2017e

So other developers think that the class property name makes more
sense than the proposed name in the TODO section. In an attempt to
rename it in this patc: Ia9f0cd7d0117f67d2017e, it was rather adviced
to remove the todo and leave the class property name as-is.

Change-Id: I3336b5a6112f098e290f102caac6b04c0b50b076

5 years agoDevelopmentSettings: Remove unused globals & declare $wgSQLMode
Derick Alangi [Wed, 10 Apr 2019 16:01:12 +0000 (17:01 +0100)]
DevelopmentSettings: Remove unused globals & declare $wgSQLMode

Some globals where declared but not used and $wgSQLMode was not declared
at all. Removed the unsed vars.

Change-Id: I44e6b8b6173674089271a172cf7bda6e320c53d8

5 years agoMerge "Reporting API and Feature Policy reporting support"
jenkins-bot [Sat, 13 Apr 2019 16:50:39 +0000 (16:50 +0000)]
Merge "Reporting API and Feature Policy reporting support"

5 years agoregistration: Allow to require environment abilities
MGChecker [Sat, 13 Oct 2018 22:24:31 +0000 (00:24 +0200)]
registration: Allow to require environment abilities

This patch adds the possibility for extensions and skins to require
certain environment abiltites that are not necessarily PHP extensions.

For now, the only ability introduced is the ability to shell out, but
the processing and testing is written in a more general way to allow
users to add more abilties later on by just changing getAbilities().

In theory, this allows using VersionChecker to check for random
abilities if they are specified in the constructor, as it is comletely
environment agnostic and not really bound to just be used for checking
extension compatibility.

Furthermore, it is possible to specify custom error messages for each of
these abilities in the constructor. Other parts of MediaWiki may use
these features to check for requirements while working with totally
different abilities.

Bug: T212472
Change-Id: Iff8512530b08ef509e7ac0b6ed8fe9578ef3e2a1

5 years agoMerge "linting: Start enforcing a basic CSS class naming rule (with lots of opt-outs)"
jenkins-bot [Sat, 13 Apr 2019 14:37:00 +0000 (14:37 +0000)]
Merge "linting: Start enforcing a basic CSS class naming rule (with lots of opt-outs)"

5 years agoMerge "Third argument to unpack() requires PHP 7.1"
jenkins-bot [Sat, 13 Apr 2019 08:24:42 +0000 (08:24 +0000)]
Merge "Third argument to unpack() requires PHP 7.1"

5 years agoReporting API and Feature Policy reporting support
Gilles Dubuc [Fri, 22 Mar 2019 05:43:30 +0000 (06:43 +0100)]
Reporting API and Feature Policy reporting support

These are experimental APIs that lets one report
policy violations:

https://www.w3.org/TR/reporting/
https://github.com/w3c/webappsec-feature-policy/blob/master/reporting.md

Bug: T209572
Change-Id: I002e7802000ec37b3320d8ae761cc1888d4f6edb

5 years agoImprove comments of outputVariesOnRevisionMetaData()
Aaron Schulz [Sat, 13 Apr 2019 03:32:53 +0000 (20:32 -0700)]
Improve comments of outputVariesOnRevisionMetaData()

Change-Id: Ie54e068515ac09af27fdc38eef7863c3a4d252f8

5 years agoMerge "Add vary-revision-exist flag to handle {{REVISIONID}} and parser cache"
jenkins-bot [Sat, 13 Apr 2019 00:43:27 +0000 (00:43 +0000)]
Merge "Add vary-revision-exist flag to handle {{REVISIONID}} and parser cache"

5 years agoAdd vary-revision-exist flag to handle {{REVISIONID}} and parser cache
Aaron Schulz [Fri, 12 Apr 2019 23:54:31 +0000 (16:54 -0700)]
Add vary-revision-exist flag to handle {{REVISIONID}} and parser cache

Follow-up to c537eb186862b3

Bug: T220854
Change-Id: Idc19cc29764a38e3671ca1dea158bd5fb46eaf4d

5 years agoMerge "Remove bogus field references in DerivedPageDataUpdater"
jenkins-bot [Sat, 13 Apr 2019 00:04:23 +0000 (00:04 +0000)]
Merge "Remove bogus field references in DerivedPageDataUpdater"

5 years agoMerge "parser: Fix return type for methods and match phpdoc comments"
jenkins-bot [Fri, 12 Apr 2019 23:53:07 +0000 (23:53 +0000)]
Merge "parser: Fix return type for methods and match phpdoc comments"

5 years agoMerge "logging: Replace deprecated use of CommentStore::getStore()"
jenkins-bot [Fri, 12 Apr 2019 23:49:05 +0000 (23:49 +0000)]
Merge "logging: Replace deprecated use of CommentStore::getStore()"

5 years agoMerge "Category: Remove "todo" comment about moving code from CategoryPage"
jenkins-bot [Fri, 12 Apr 2019 23:44:51 +0000 (23:44 +0000)]
Merge "Category: Remove "todo" comment about moving code from CategoryPage"