lhc/web/wiklou.git
5 years agoMerge "SpecialNewPages: Fix omitted Show/Hide redirect value"
jenkins-bot [Wed, 1 Aug 2018 18:45:41 +0000 (18:45 +0000)]
Merge "SpecialNewPages: Fix omitted Show/Hide redirect value"

5 years agoMerge "resources: Upgrade jquery.i18n from 1.0.4 to 1.0.5"
jenkins-bot [Wed, 1 Aug 2018 18:03:00 +0000 (18:03 +0000)]
Merge "resources: Upgrade jquery.i18n from 1.0.4 to 1.0.5"

5 years agoMerge "Fix pingback on non-MySQL"
jenkins-bot [Wed, 1 Aug 2018 17:55:15 +0000 (17:55 +0000)]
Merge "Fix pingback on non-MySQL"

5 years agoresources: Upgrade jquery.i18n from 1.0.4 to 1.0.5
James D. Forrester [Wed, 25 Jul 2018 14:58:24 +0000 (07:58 -0700)]
resources: Upgrade jquery.i18n from 1.0.4 to 1.0.5

Change-Id: I9b7eebaec8fea6c328543ebf18afa8062c54efbe

5 years agoMerge "Convert file delete to use OOUI"
jenkins-bot [Wed, 1 Aug 2018 17:23:24 +0000 (17:23 +0000)]
Merge "Convert file delete to use OOUI"

5 years agoConvert file delete to use OOUI
Jayprakash12345 [Sat, 26 May 2018 19:25:24 +0000 (00:55 +0530)]
Convert file delete to use OOUI

Also make a few changes for consistency with normal delete form:
* Add `autofocus` attribute on the "Other/additional reason" text field
* Remove bold styling from "Suppress …" checkbox label
* Remove `class="wpReasonDropDown"` from the "Reason" dropdown
* Remove `id="wpDeleteSuppressRow"` from the "Suppress …" form row

Bug: T173997
Change-Id: Ia5a0412c959c6149b01afe7fc6cbf5e8591673ac

5 years agoMerge "[MCR] Allow extensions to manipulate service instances"
jenkins-bot [Wed, 1 Aug 2018 16:57:36 +0000 (16:57 +0000)]
Merge "[MCR] Allow extensions to manipulate service instances"

5 years agoRemove long-dead OutputPage methods set/getPageTitleActionText()
Aryeh Gregor [Sun, 29 Jul 2018 13:30:39 +0000 (16:30 +0300)]
Remove long-dead OutputPage methods set/getPageTitleActionText()

They were accidentally made non-functional in April 2009 by commit
e4d21170.  Subsequent commits 2d045fa19e230f30e275ea28ae45908c
removed all callers by October 2011.  Needless to say, I found no
callers in core or extensions.

It seems we have the functionality in some other way, probably just by
directly calling setHTMLTitle(), so there's no need to revive this
feature.

Bug: T200643
Change-Id: Ifa2537b97cf19e7e91ee33d4ea4c131f7a38ee89

5 years agoMerge "Update categoriespagetext message"
jenkins-bot [Wed, 1 Aug 2018 10:03:05 +0000 (10:03 +0000)]
Merge "Update categoriespagetext message"

5 years agoConvert remaining MagicWord:: calls to MagicWordFactory
Aryeh Gregor [Mon, 30 Jul 2018 14:18:09 +0000 (17:18 +0300)]
Convert remaining MagicWord:: calls to MagicWordFactory

Bug: T200247
Depends-On: Ie061fe90f9b9eca0cbf7e8199d9ca325c464867a
Change-Id: I49c507f3875e46a8e15fd2c28d61c17188aabffc

5 years agoMerge "Update MagicWordArray to use MagicWordFactory"
jenkins-bot [Wed, 1 Aug 2018 04:35:18 +0000 (04:35 +0000)]
Merge "Update MagicWordArray to use MagicWordFactory"

5 years agoFix pingback on non-MySQL
Tim Starling [Wed, 1 Aug 2018 01:30:49 +0000 (11:30 +1000)]
Fix pingback on non-MySQL

MySQL has its own implementation of upsert(), but the others rely on
$uniqueIndexes being a field list, not a field/value associative array.
The previous code generated an SQL error when checking for existing
values.

Bug: T200864
Change-Id: Ifb56f7f350fbb84144bc6f5a1dd76939816338a6

5 years agoFix total breakage of SQLite web upgrade
Tim Starling [Wed, 1 Aug 2018 00:18:08 +0000 (10:18 +1000)]
Fix total breakage of SQLite web upgrade

Partial revert of 8d61cf2793abd2, since LBFactoryTest.php passes without
overriding selectDB() in the current master. It's unclear why it was necessary.

Bug: T200861
Change-Id: I7c0560d7890616899297f81a227db98996d5cb7f

5 years agoMerge "Fixing linkTrail problem for Urdu language."
jenkins-bot [Tue, 31 Jul 2018 22:36:08 +0000 (22:36 +0000)]
Merge "Fixing linkTrail problem for Urdu language."

5 years agoMerge "Disable "...able to change preferences" browser test"
jenkins-bot [Tue, 31 Jul 2018 21:44:58 +0000 (21:44 +0000)]
Merge "Disable "...able to change preferences" browser test"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 31 Jul 2018 20:06:35 +0000 (22:06 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I5cc354afe1211eb802a885358545a5a7fd08efff

5 years agoDisable "...able to change preferences" browser test
Kunal Mehta [Tue, 31 Jul 2018 19:28:31 +0000 (12:28 -0700)]
Disable "...able to change preferences" browser test

It's incredibly flaky.

Bug: T199446
Change-Id: I5372a285dab4f5f032ae340d9fd30b9c7c8bf72a

5 years agoUpdate MagicWordArray to use MagicWordFactory
Aryeh Gregor [Wed, 25 Jul 2018 12:22:00 +0000 (15:22 +0300)]
Update MagicWordArray to use MagicWordFactory

Bug: T200247
Change-Id: Ie5a60b81382d7299beadc691fe4d27e931ebe0ed

5 years agoMerge "Update CoreParserFunctions to use MagicWordFactory"
jenkins-bot [Tue, 31 Jul 2018 18:23:02 +0000 (18:23 +0000)]
Merge "Update CoreParserFunctions to use MagicWordFactory"

5 years agoMerge "Add explanation about JS editing changes to permission error"
jenkins-bot [Tue, 31 Jul 2018 18:22:56 +0000 (18:22 +0000)]
Merge "Add explanation about JS editing changes to permission error"

5 years agoMerge "Return array without holes from User::getAllGroups"
jenkins-bot [Tue, 31 Jul 2018 17:23:42 +0000 (17:23 +0000)]
Merge "Return array without holes from User::getAllGroups"

5 years agoMerge "Fix variable capitalization in message"
jenkins-bot [Tue, 31 Jul 2018 17:23:37 +0000 (17:23 +0000)]
Merge "Fix variable capitalization in message"

5 years agoMerge "Fix documentation for $wgRightsText"
jenkins-bot [Tue, 31 Jul 2018 17:22:27 +0000 (17:22 +0000)]
Merge "Fix documentation for $wgRightsText"

5 years agoMerge "Prefill date in form on Special:Log when calling with old parameters"
jenkins-bot [Tue, 31 Jul 2018 15:45:04 +0000 (15:45 +0000)]
Merge "Prefill date in form on Special:Log when calling with old parameters"

5 years agoMerge "ReverseChronologicalPager: Fix timezone confusion"
jenkins-bot [Tue, 31 Jul 2018 15:44:59 +0000 (15:44 +0000)]
Merge "ReverseChronologicalPager: Fix timezone confusion"

5 years agoReturn array without holes from User::getAllGroups
Aryeh Gregor [Tue, 31 Jul 2018 13:17:42 +0000 (16:17 +0300)]
Return array without holes from User::getAllGroups

Change-Id: I2933ffe2cddec3d595536f93df17b609cdabab9e

5 years agoFix variable capitalization in message
Aryeh Gregor [Tue, 31 Jul 2018 13:17:09 +0000 (16:17 +0300)]
Fix variable capitalization in message

Change-Id: I96be2f3585dd1711f4aaf1a114dfef7c106de202

5 years agoFix documentation for $wgRightsText
Aryeh Gregor [Tue, 31 Jul 2018 13:16:22 +0000 (16:16 +0300)]
Fix documentation for $wgRightsText

Change-Id: I6e7b8501241276b91172df7f13dfc7a1227b23a5

5 years agoMerge "SpecialPageExecutor, make sure Skin context is correctly set"
jenkins-bot [Tue, 31 Jul 2018 13:12:46 +0000 (13:12 +0000)]
Merge "SpecialPageExecutor, make sure Skin context is correctly set"

5 years agoUpdate CoreParserFunctions to use MagicWordFactory
Aryeh Gregor [Wed, 25 Jul 2018 12:14:13 +0000 (15:14 +0300)]
Update CoreParserFunctions to use MagicWordFactory

Bug: T200247
Change-Id: I122d8acf601581b18756a5b8d65e50953b28c21d

5 years agoSpecialPageExecutor, make sure Skin context is correctly set
addshore [Tue, 31 Jul 2018 10:11:50 +0000 (11:11 +0100)]
SpecialPageExecutor, make sure Skin context is correctly set

Bug: T200771
Change-Id: I6d642449a0962f0a6bc242d2121ad3f270d9df77

5 years agoMerge "Fix PerDbnameStatsdDataFactory metric prefix"
jenkins-bot [Tue, 31 Jul 2018 09:50:32 +0000 (09:50 +0000)]
Merge "Fix PerDbnameStatsdDataFactory metric prefix"

5 years agoMerge "Add parentheses around nested inline IF statements"
jenkins-bot [Tue, 31 Jul 2018 08:07:19 +0000 (08:07 +0000)]
Merge "Add parentheses around nested inline IF statements"

5 years agoIntroduce SpecialPageFatalTest
addshore [Thu, 24 Mar 2016 14:11:58 +0000 (14:11 +0000)]
Introduce SpecialPageFatalTest

This test makes sure that special pages do not fatal
in their most basic form (anon user viewing the page).

Depends-On: I3a9f5b315eb114cb12ea4071f8da9079f797fcf6
Change-Id: Ic675e92d8dd8f11fa67914d2ce1dc00a379106ca

5 years agoFixing linkTrail problem for Urdu language.
محمد شعیب [Tue, 17 Oct 2017 19:08:14 +0000 (19:08 +0000)]
Fixing linkTrail problem for Urdu language.

Bug: T178400
Change-Id: I9194fcbfa3768155a1b0965b566defa12e65d18e

5 years agoMerge "Update Parser to use MagicWordFactory"
jenkins-bot [Tue, 31 Jul 2018 05:37:54 +0000 (05:37 +0000)]
Merge "Update Parser to use MagicWordFactory"

5 years agoMerge "MagicWordFactory to replace MagicWord static members/methods"
jenkins-bot [Tue, 31 Jul 2018 05:34:30 +0000 (05:34 +0000)]
Merge "MagicWordFactory to replace MagicWord static members/methods"

5 years agoMerge "Use multibyte-aware truncation to avoid invalid UTF-8 in cl_sortkey_prefix"
jenkins-bot [Tue, 31 Jul 2018 04:16:10 +0000 (04:16 +0000)]
Merge "Use multibyte-aware truncation to avoid invalid UTF-8 in cl_sortkey_prefix"

5 years agoPass $title to 'GetLinkColours' hook
Bartosz Dziewoński [Mon, 30 Jul 2018 15:25:25 +0000 (17:25 +0200)]
Pass $title to 'GetLinkColours' hook

I think it's reasonable for link "colours" to depend on the page on
which they are shown. It seems similar to how self-links are handled.
The $colours variable is not cached, so title-specific link colours
will not "leak" to other titles.

Used in ProofreadPage in Ic910c2c33a6f1f8a70d9a122fbd2128428f29bd5.

Bug: T199288
Change-Id: I7378102a3e06544e9e695b255982c9bb0cfbf3a2

5 years agoUpdate categoriespagetext message
GeoffreyT2000 [Sat, 24 Feb 2018 04:01:22 +0000 (20:01 -0800)]
Update categoriespagetext message

Since Special:Categories now lists empty categories, the message will need to be updated.

Bug: T185066
Change-Id: Ifaebeb0e95bc37aa51d0ddd426b8850bb40d9dbb

5 years agoMerge "API: Update query modules for MCR"
jenkins-bot [Mon, 30 Jul 2018 22:40:40 +0000 (22:40 +0000)]
Merge "API: Update query modules for MCR"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 30 Jul 2018 19:54:33 +0000 (21:54 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I2a9594ddac8152a66caadade3c0293a16942d42a

5 years agoUse multibyte-aware truncation to avoid invalid UTF-8 in cl_sortkey_prefix
Bartosz Dziewoński [Mon, 30 Jul 2018 19:37:45 +0000 (21:37 +0200)]
Use multibyte-aware truncation to avoid invalid UTF-8 in cl_sortkey_prefix

The invalid UTF-8 could cause incorrect sorting of affected pages in
category lists on wikis using UCA collations. On my local testing
wiki, the generated cl_sortkey was just 0x30 regardless of the value
of cl_sortkey_prefix.

This doesn't fix existing bad data in the database. It will only be
updated when the affected page is edited (or null-edited).

The cl_timestamp field will also be updated when that happens, which
apparently may affect Wikinews' DynamicPageList extension, according
to comments on T27254. This is not easily avoidable.

Bug: T200623
Change-Id: I4baa9ea3c7f831ff3c9c51e6b8e5d66e7da42a91

5 years agoUpdate Parser to use MagicWordFactory
Aryeh Gregor [Wed, 25 Jul 2018 11:55:18 +0000 (14:55 +0300)]
Update Parser to use MagicWordFactory

Bug: T200247
Depends-On: Ie061fe90f9b9eca0cbf7e8199d9ca325c464867a
Change-Id: Iab6a4cb32c491caf2685cdd68f9465ef1dfa3c4c

5 years agoMagicWordFactory to replace MagicWord static members/methods
Aryeh Gregor [Tue, 24 Jul 2018 16:44:09 +0000 (19:44 +0300)]
MagicWordFactory to replace MagicWord static members/methods

Static members of MagicWord have been removed.

Static methods are soft-deprecated and forward to the factory.  They
will be hard-deprecated when all callers are removed from core.

MagicWord::clearCache() has been removed.  Instead, call
resetServiceForTesting( 'MagicWordFactory' ) on your MediaWikiServices
object.

Change-Id: Ie061fe90f9b9eca0cbf7e8199d9ca325c464867a
Bug: T200247

5 years agoMerge "Special:NewPages: Change to use OOUI"
jenkins-bot [Mon, 30 Jul 2018 14:07:39 +0000 (14:07 +0000)]
Merge "Special:NewPages: Change to use OOUI"

5 years agoMerge "Improve test coverage for OutputPage"
jenkins-bot [Mon, 30 Jul 2018 12:48:49 +0000 (12:48 +0000)]
Merge "Improve test coverage for OutputPage"

5 years agoMerge "Treat all time values on Special:Watchlist as floats"
jenkins-bot [Mon, 30 Jul 2018 12:27:38 +0000 (12:27 +0000)]
Merge "Treat all time values on Special:Watchlist as floats"

5 years agoImprove test coverage for OutputPage
Aryeh Gregor [Mon, 23 Jul 2018 18:26:32 +0000 (21:26 +0300)]
Improve test coverage for OutputPage

Raises coverage locally from 16.10% to 26.81%.

Change-Id: Ib564624c644ee6620ac06872f5684831acaaaadb
Depends-On: I79c4e37092958c63a693194b27a9eafae70cb2f8

5 years agoTreat all time values on Special:Watchlist as floats
Matěj Suchánek [Sun, 29 Jul 2018 09:54:45 +0000 (11:54 +0200)]
Treat all time values on Special:Watchlist as floats

PHP division may return float or int, depending on the operands. [1]
Make sure all numbers are of the same type (floats), because
XmlSelect compares values with ===.

[1] http://php.net/manual/en/language.operators.arithmetic.php

Bug: T199566
Change-Id: I37df6fd425f47d9a4562d83e04fcb50c3b97e0da

5 years agoAdd parentheses around nested inline IF statements
Kevin Israel [Mon, 30 Jul 2018 11:15:55 +0000 (07:15 -0400)]
Add parentheses around nested inline IF statements

To improve readability of the code. Done using the NestedInlineIfsSniff
I wrote for MediaWiki-Codesniffer (T171520, I0ddf05d9).

Change-Id: I89ac6e9b5eab1f599fec3686b40a3e01d29d0250

5 years agoAdd @since tag for MediaWikiServices::getConfigRepository
addshore [Mon, 30 Jul 2018 10:01:37 +0000 (11:01 +0100)]
Add @since tag for MediaWikiServices::getConfigRepository

Change-Id: I9c92b9640526c5a8dee2e994a5d0b1bc27d43381

5 years agoMerge "Move utility methods from ApiTestCase to MediaWikiTestCase"
jenkins-bot [Mon, 30 Jul 2018 09:06:42 +0000 (09:06 +0000)]
Merge "Move utility methods from ApiTestCase to MediaWikiTestCase"

5 years agoMerge "Use array_merge() for OutputPage::$mLanguageLinks, not +"
jenkins-bot [Mon, 30 Jul 2018 03:14:34 +0000 (03:14 +0000)]
Merge "Use array_merge() for OutputPage::$mLanguageLinks, not +"

5 years agoSpecial:NewPages: Change to use OOUI
Pankajeshkr [Sat, 12 Mar 2016 09:53:20 +0000 (15:23 +0530)]
Special:NewPages: Change to use OOUI

Bug: T117739
Change-Id: I802d215374c0b5247247dd4ae2facce251e8d369

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 29 Jul 2018 19:55:00 +0000 (21:55 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I3d04523e2e1357fb5f5b69bb91b5d51d65dcdf1b

5 years agoUse array_merge() for OutputPage::$mLanguageLinks, not +
Aryeh Gregor [Wed, 25 Jul 2018 18:36:56 +0000 (21:36 +0300)]
Use array_merge() for OutputPage::$mLanguageLinks, not +

Based on documentation together with inspection of some callers, the
intent seems to be that this is an indexed array, not associative.  +
will therefore do totally the wrong thing, ignoring any new values that
have the same key as an existing item (e.g., '0' or '1').  Even if it
was an associative array, + keeps the values on the left-hand side,
which means you normally want to do $foo = $bar + $foo instead of $foo
+= $bar if you want to overwrite old values with the new ones.

Before this change, calling addLanguageLinks() or
addParserOutputMetadata() would generally not add all of the links it
was supposed to if there were already links defined.  (It could still
work if the arrays' keys didn't conflict for some reason, e.g.,
something passed an associative array or an indexed array with a hole.)
I don't know if anything actually hits this bug, because it's likely
that callers usually add all their links at once.  I find no uses of
addLanguageLinks() at all.

I found this bug while working on adding more tests for OutputPage, and
the tests for this change will be submitted later in
Icdc0288c04b8c4ba841f9fbb3e05a0cdc8a20fa5.

Change-Id: I53f6e7ea94417b0034371e56e733e8c86af21658

5 years agoMove utility methods from ApiTestCase to MediaWikiTestCase
Aryeh Gregor [Tue, 24 Jul 2018 14:50:03 +0000 (17:50 +0300)]
Move utility methods from ApiTestCase to MediaWikiTestCase

Change-Id: I79c4e37092958c63a693194b27a9eafae70cb2f8

5 years agoMerge "GlobalFunctions: Hard-deprecate wfUseMW, unused"
jenkins-bot [Sun, 29 Jul 2018 00:32:46 +0000 (00:32 +0000)]
Merge "GlobalFunctions: Hard-deprecate wfUseMW, unused"

5 years agoGlobalFunctions: Hard-deprecate wfUseMW, unused
James D. Forrester [Sat, 28 Jul 2018 23:59:08 +0000 (16:59 -0700)]
GlobalFunctions: Hard-deprecate wfUseMW, unused

Change-Id: Ifa532f2fb7d482238e4b922f622a79b9ab6540e8

5 years agoMake sure to not unpack an associative array into parameter list
Max Semenik [Sat, 28 Jul 2018 20:59:22 +0000 (13:59 -0700)]
Make sure to not unpack an associative array into parameter list

Bug: T200394
Change-Id: I9c28e1cadeb76275d24eb7725f1578bf5ba43ad0

5 years agoMerge "Guard against uncountable tag values"
jenkins-bot [Sat, 28 Jul 2018 21:43:04 +0000 (21:43 +0000)]
Merge "Guard against uncountable tag values"

5 years agoGuard against uncountable tag values
Sam Wilson [Sat, 30 Jun 2018 07:55:47 +0000 (15:55 +0800)]
Guard against uncountable tag values

As of PHP 7.2 counting false or null raises a "Warning: count(): Parameter must be an array or an object that implements Countable".

Bug: T182377
Bug: T196793
Change-Id: I7ca38bc55ae04f68106fe0d27c7d496da1538459

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 28 Jul 2018 19:57:49 +0000 (21:57 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I8b1b0ee78ffc63ec22a29175249ec4eae1c8afdc

5 years agoUse LogPage::validTypes() instead of $wgLogTypes in a few places
Kunal Mehta [Wed, 25 Jul 2018 23:40:47 +0000 (16:40 -0700)]
Use LogPage::validTypes() instead of $wgLogTypes in a few places

This is preparation for T200385, which will add a hook to modify the
list of known log types, which will bypass the global variable.

Change-Id: I763cf8b71a98d1dba5f9964fc8d919a268c5d8a5

5 years agoEnclose compact() call in error suppression
Max Semenik [Sat, 28 Jul 2018 03:13:57 +0000 (20:13 -0700)]
Enclose compact() call in error suppression

In PHP 7.3, compact() now emits warnings when a variable doesn't exist.
Because our language files aren't required to contain all the possible
variables, this results in massive spam trying to run tests.

Change-Id: Idab0340ec1cdebfca67cb448e350a408438bcbbc

5 years agoAPI: Update query modules for MCR
Brad Jorsch [Fri, 16 Feb 2018 18:23:45 +0000 (13:23 -0500)]
API: Update query modules for MCR

MCR deprecated the Revision class in favor of the broadly similar
RevisionRecord, and more interestingly added the concept of multiple
content "slots" to revisions.

Thus, prop=revisions, prop=deletedrevisions, and so on gain a parameter
to specify which slots are wanted. When this new parameter is not
specified (and any content-related props are specified), a warning about
the legacy format will be issued.

The rest of the modules just needed to call methods or use constants on
RevisionRecord instead of Revision. ApiQueryDeletedrevs wasn't touched,
since it has been deprecated since 1.25 anyway.

This also updates a few non-query modules that don't depend on details
of editing, diffing, or viewing MCR revisions that haven't been figured
out yet.

Bug: T200568
Change-Id: I1327d1784f5cedb006cd74df834cf9a560a77a5d

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 27 Jul 2018 19:54:02 +0000 (21:54 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ibec891ce84ce50657b8b3486f5be27629e6404f5

5 years agoMerge "Remove two unused OutputPage methods"
jenkins-bot [Fri, 27 Jul 2018 18:33:44 +0000 (18:33 +0000)]
Merge "Remove two unused OutputPage methods"

5 years agoMerge "Disallow empty paths in LockManager"
jenkins-bot [Fri, 27 Jul 2018 10:04:02 +0000 (10:04 +0000)]
Merge "Disallow empty paths in LockManager"

5 years agoMerge "Correct recent schema changes for MSSQL, Oracle"
jenkins-bot [Fri, 27 Jul 2018 08:30:49 +0000 (08:30 +0000)]
Merge "Correct recent schema changes for MSSQL, Oracle"

5 years agoMerge "Fix test database prefix in ParserTestTopLevelSuite"
jenkins-bot [Fri, 27 Jul 2018 06:53:16 +0000 (06:53 +0000)]
Merge "Fix test database prefix in ParserTestTopLevelSuite"

5 years agoAdd explanation about JS editing changes to permission error
Gergő Tisza [Mon, 23 Jul 2018 17:55:08 +0000 (19:55 +0200)]
Add explanation about JS editing changes to permission error

This does not handle the error message when viewing a non-existent
page (noarticletext-nopermission), but that seems complicated to
get right.

Change-Id: Ia4e798b9a646908bd84fec5a53db929040e61aa7

5 years agoMerge "HistoryAction: Implement HistoryPageToolLinks hook for adding more links"
jenkins-bot [Thu, 26 Jul 2018 23:20:35 +0000 (23:20 +0000)]
Merge "HistoryAction: Implement HistoryPageToolLinks hook for adding more links"

5 years agoMerge "Check for right-* messages as a structure test"
jenkins-bot [Thu, 26 Jul 2018 22:34:00 +0000 (22:34 +0000)]
Merge "Check for right-* messages as a structure test"

5 years agoMerge "Segregate right to edit sitewide CSS/JS"
jenkins-bot [Thu, 26 Jul 2018 22:26:11 +0000 (22:26 +0000)]
Merge "Segregate right to edit sitewide CSS/JS"

5 years agoMerge "Deprecate $wgExternalDiffEngine = 'wikidiff2'"
jenkins-bot [Thu, 26 Jul 2018 21:37:00 +0000 (21:37 +0000)]
Merge "Deprecate $wgExternalDiffEngine = 'wikidiff2'"

5 years agoCheck for right-* messages as a structure test
Kunal Mehta [Thu, 26 Jul 2018 21:14:54 +0000 (14:14 -0700)]
Check for right-* messages as a structure test

Structure tests run for extensions as well, which this test should. All
user rights should have right-* messages for display in the interface.

Bug: T143156
Change-Id: I23b8eb66bc68121b2ae17e73e705acd3e6f2d053

5 years agoPrefill date in form on Special:Log when calling with old parameters
Bartosz Dziewoński [Thu, 26 Jul 2018 19:55:24 +0000 (21:55 +0200)]
Prefill date in form on Special:Log when calling with old parameters

When the date is specified using &year=...&month=... URL parameters
rather than &wpdate=..., HTMLForm can't automatically fill it in,
but we can explicitly specify the default.

Bug: T199856
Change-Id: I71f4953d57a3893190778e5bd763db108dc433d3

5 years agoReverseChronologicalPager: Fix timezone confusion
Bartosz Dziewoński [Mon, 23 Jul 2018 21:34:40 +0000 (23:34 +0200)]
ReverseChronologicalPager: Fix timezone confusion

(This change is best tested with Special:Log before changes from
38756eae4, since it seems the $mDay/$mMonth/$mYear values are not
directly used anywhere in core after that.)

The setTimezone() call did not actually change the offset used for
database lookup, because getTimestamp() returns a Unix timestamp,
which by definition does not include timezone information.

It did change the offset used for year/month/day fields in the
interface, but it changed it in the wrong direction: instead of
assuming the date is in local timezone and converting to UTC, it
assumed the date is in UTC and converted it to local timezone.

We don't actually want to do anything with timezones here. For better
or worse, the date selectors for pagers have always used UTC dates.
The timezone code was only introduced relatively recently in 53fa809a.

What we really want for the interface is to display the previous
date, relative to the database offset. The interface asks the user
to select the month/date up to which to display things (such as
"May 2018 (and earlier)"), but the database queries use strict
comparison (such as `log_timestamp < '20180601000000'`), so the
database offset is calculated to the next date after selected one.

The incorrect timezone calculation accidentally did so, but only if
the wiki timezone had a negative offset relative to the UTC. If the
wiki was using UTC or a timezone with positive offset, the correction
was not applied, causing the selected date in the interface to move
one day forward from the date that was set.

Bug: T171110
Change-Id: I8c2cd398d7c7ac68a8f46ee94cb9e7c6beed5694

5 years agoMerge "Prefill username in form when calling Special:Log/<username>"
jenkins-bot [Thu, 26 Jul 2018 20:06:13 +0000 (20:06 +0000)]
Merge "Prefill username in form when calling Special:Log/<username>"

5 years agoMerge "Handle $title === null in Title::newFromText"
jenkins-bot [Thu, 26 Jul 2018 19:33:03 +0000 (19:33 +0000)]
Merge "Handle $title === null in Title::newFromText"

5 years agoMerge "SelectWithInput: Add 'disabled' property on main widget"
jenkins-bot [Thu, 26 Jul 2018 19:17:35 +0000 (19:17 +0000)]
Merge "SelectWithInput: Add 'disabled' property on main widget"

5 years agoMerge "GlobalFunctions: Enable patch-coverage for wfExpandUrl test"
jenkins-bot [Thu, 26 Jul 2018 18:59:10 +0000 (18:59 +0000)]
Merge "GlobalFunctions: Enable patch-coverage for wfExpandUrl test"

5 years agoMerge "INSTALL: Don't warn against using PHP "as a CGI plugin""
jenkins-bot [Thu, 26 Jul 2018 18:48:28 +0000 (18:48 +0000)]
Merge "INSTALL: Don't warn against using PHP "as a CGI plugin""

5 years agoMerge "Update jetbrains/phpstorm-stubs"
jenkins-bot [Thu, 26 Jul 2018 18:46:06 +0000 (18:46 +0000)]
Merge "Update jetbrains/phpstorm-stubs"

5 years agoHandle $title === null in Title::newFromText
Gergő Tisza [Thu, 26 Jul 2018 18:39:21 +0000 (20:39 +0200)]
Handle $title === null in Title::newFromText

This relied on TitleCodec throwing MalformedTitleException in the
past, but that is fragile as other parts of the logic do not
expect null.

Bug: T200456
Change-Id: I1aca3971e2a9c0b1fe3adbcf34f3ee65b2271234

5 years agoDisallow empty paths in LockManager
Aaron Schulz [Thu, 26 Jul 2018 17:42:34 +0000 (10:42 -0700)]
Disallow empty paths in LockManager

Fix broken FileBackend test that had paths normalizing to null.

Change-Id: I8a7e88ae44118cc9578e1b306a5a008ccefc23af

5 years agoUpdate composer/spdx-licenses to 1.4.0 and mediawiki/mediawiki-codesniffer to 21.0.0
Reedy [Thu, 26 Jul 2018 16:31:49 +0000 (17:31 +0100)]
Update composer/spdx-licenses to 1.4.0 and mediawiki/mediawiki-codesniffer to 21.0.0

https://github.com/composer/spdx-licenses/compare/1.3.0...1.4.0

Change-Id: I39f7a1310455159866bfed5224536e800befec0d

5 years agoUpdate jetbrains/phpstorm-stubs
Reedy [Thu, 26 Jul 2018 17:14:22 +0000 (18:14 +0100)]
Update jetbrains/phpstorm-stubs

Change-Id: I553afcc8f0126b9611dd9fce26029bd9c9e17071

5 years agoPrefill username in form when calling Special:Log/<username>
Jayprakash12345 [Thu, 26 Jul 2018 16:50:56 +0000 (22:20 +0530)]
Prefill username in form when calling Special:Log/<username>

Bug: T200446
Change-Id: I3f2fcedee8440d5943e556f7c1c06dfb1085e549

5 years agoMerge "Upstream EasyDeflate library from VisualEditor"
jenkins-bot [Thu, 26 Jul 2018 15:06:41 +0000 (15:06 +0000)]
Merge "Upstream EasyDeflate library from VisualEditor"

5 years agoFix PerDbnameStatsdDataFactory metric prefix
addshore [Thu, 26 Jul 2018 12:23:38 +0000 (13:23 +0100)]
Fix PerDbnameStatsdDataFactory metric prefix

This was reporting Mediawikiwikidatawiki for example as the '.'
was added inside the rtrim call

Bug: T196609
Bug: T200424
Change-Id: Ia8e51371b9a27ed14ec55bb34a52ec9e65ad55cf

5 years agoMerge "Deprecate public access to some DifferenceEngine properties"
jenkins-bot [Thu, 26 Jul 2018 12:06:05 +0000 (12:06 +0000)]
Merge "Deprecate public access to some DifferenceEngine properties"

5 years agoDeprecate $wgExternalDiffEngine = 'wikidiff2'
Gergő Tisza [Wed, 11 Jul 2018 11:11:25 +0000 (13:11 +0200)]
Deprecate $wgExternalDiffEngine = 'wikidiff2'

The value 'wikidiff2' for $wgExternalDiffEngine was obsoleted in
I32b670ebf6 but not formally deprecated. Let's do that now.

Change-Id: Ie5ccd3895544cf393885b84d38eca6003c79e8ad
Depends-On: I33c6207cfc5fb66987d31818bc27055f597d28c7

5 years agoDeprecate public access to some DifferenceEngine properties
Gergő Tisza [Wed, 11 Jul 2018 08:54:58 +0000 (10:54 +0200)]
Deprecate public access to some DifferenceEngine properties

These had no business being public in the first place and there is
no usage in Gerrit. In case something does use them, it will probably
be broken by the refactoring that's soon to come, so the deprecation
warning makes it easier to figure out where the problem lies.

Change-Id: I72ba5cfbf91f4af16028ba4f8619df6a7168a786

5 years agoUse setContentLang() instead of setMwGlobals()
Aryeh Gregor [Wed, 25 Jul 2018 14:57:23 +0000 (17:57 +0300)]
Use setContentLang() instead of setMwGlobals()

This changes behavior in some tests by making them set $wgLanguageCode
as well as $wgContLang, but that seems like a good thing.

Bug: T200246
Change-Id: I936888f46ff9fefe2707efba837e2ce3a7ca5e3f

5 years agoRemove two unused OutputPage methods
Aryeh Gregor [Tue, 24 Jul 2018 13:45:02 +0000 (16:45 +0300)]
Remove two unused OutputPage methods

addMetadataLink and getMetadataAttribute were added in 2004 (22f8c4ce)
for functionality that was moved to extensions in 2011 (27c3b22b).
Those extensions, CreateCommonsRdf and DublinCoreRdf, now use
addHeadItem() directly.  There are no other callers in core or
extensions.

Change-Id: I4bc21fdaefc8f56969a2950eb53b340bf4aac399

5 years agoMerge "Use 'default' instead of 'value' in HTMLTextField"
jenkins-bot [Thu, 26 Jul 2018 09:05:18 +0000 (09:05 +0000)]
Merge "Use 'default' instead of 'value' in HTMLTextField"

5 years agoINSTALL: Don't warn against using PHP "as a CGI plugin"
Kevin Israel [Thu, 26 Jul 2018 05:36:19 +0000 (01:36 -0400)]
INSTALL: Don't warn against using PHP "as a CGI plugin"

This note is very old; it was added in r2832 (635388356be70130) and
r3285 (7ab7a50cf928861f). Modern versions of MediaWiki support CGI and
FastCGI installations nearly as well as mod_php installations. In fact,
Wikimedia currently uses HHVM's "fastcgi" server type, and intends to
use php-fpm with PHP 7 (see migration plan in T176370).

For a basic MediaWiki installation using the web installer, the only
difference I know of is the default URLs: /w/index.php?title=$1 for CGI,
as opposed to /w/index.php/$1 for mod_php. This issue is easy to fix by
changing $wgArticlePath, if the web server sets REQUEST_URI. Admins who
want to use short URLs (e.g. /wiki/$1) have to do this anyway.

Also, in img_auth.php and the "img-auth-nopathinfo" message, don't imply
that CGI and FastCGI server configurations generally can't provide path
information or support MediaWiki features that need it.

Change-Id: I89212e9d51f950a58f911083b9e109b69cd4e060