lhc/web/wiklou.git
5 years agoAdd maintenance script for deleting local passwords
Gergő Tisza [Sun, 10 Jun 2018 23:05:59 +0000 (01:05 +0200)]
Add maintenance script for deleting local passwords

This is mainly for the benefit of authentication extensions which
all need similar functionality for removing local passwords on a
wiki where local authentication was used for a while but has been
disabled, but can be used directly to just indiscriminately remove
the passwords of all users.

To test the change without irreversibly locking out users, an
option is provided to make the password invalid in an
easy-to-reverse way.

The immediate use case is I974184899c33.

This patch also introduces the maintenance/includes directory
to hold PHP files which are not executable scripts themselves.
(Previously such files had a .inc extension, but that is so PHP4.)

Bug: T57420
Change-Id: If7207b80a2c8374e90182e0b09d8f76ee94264b0

5 years agoAdd PasswordFactory to MediaWikiServices
Kunal Mehta [Sun, 2 Oct 2016 07:41:55 +0000 (00:41 -0700)]
Add PasswordFactory to MediaWikiServices

Instead of having basically every caller do:
 $pf = new PasswordFactory();
 $pf->init( RequestContext::getMain()->getConfig() );
Just create a single PasswordFactory via MediaWikiServices and pass that
around. Things that want to use their own config can still pass settings
via the new constructor.

This will eventually let us remove the init() function, removing the
only hard dependency upon MediaWiki, to make it easier to librarize
(T89742).

Change-Id: I0fc7520dc023b11a7fa66083eff7b88ebfe49c7b

5 years agoMerge "Document Parser::$mFirstCall"
jenkins-bot [Thu, 2 Aug 2018 12:56:42 +0000 (12:56 +0000)]
Merge "Document Parser::$mFirstCall"

5 years agoMerge "Don't generate RC entries for filterable log types"
jenkins-bot [Thu, 2 Aug 2018 10:49:17 +0000 (10:49 +0000)]
Merge "Don't generate RC entries for filterable log types"

5 years agoMerge "ChangesList: HTML escape the timestamp"
jenkins-bot [Thu, 2 Aug 2018 10:22:22 +0000 (10:22 +0000)]
Merge "ChangesList: HTML escape the timestamp"

5 years agoMerge "Force phan-taint-check to think LogFormatter stuff is safe for html"
jenkins-bot [Thu, 2 Aug 2018 10:15:50 +0000 (10:15 +0000)]
Merge "Force phan-taint-check to think LogFormatter stuff is safe for html"

5 years agoChangesList: HTML escape the timestamp
Brian Wolff [Fri, 6 Jul 2018 01:02:45 +0000 (01:02 +0000)]
ChangesList: HTML escape the timestamp

Bug: T197002
Change-Id: Ib695674b9dc28a2f864f330e578cee6a1a7a4219

5 years agoDocument Parser::$mFirstCall
Kunal Mehta [Thu, 2 Aug 2018 08:57:53 +0000 (01:57 -0700)]
Document Parser::$mFirstCall

And don't bother checking its value in clearState(), since firstCallInit()
will do that anyways.

Change-Id: Ibc5e809daa614e99be91d65a363de4f697e6afa5

5 years agoMerge "Improve OutputPage test coverage more"
jenkins-bot [Thu, 2 Aug 2018 03:03:22 +0000 (03:03 +0000)]
Merge "Improve OutputPage test coverage more"

5 years agoMerge "Update ServiceWiring to use ContentLanguage"
jenkins-bot [Thu, 2 Aug 2018 02:52:29 +0000 (02:52 +0000)]
Merge "Update ServiceWiring to use ContentLanguage"

5 years agoMerge "Introduce ContentLanguage service to replace $wgContLang"
jenkins-bot [Thu, 2 Aug 2018 02:52:23 +0000 (02:52 +0000)]
Merge "Introduce ContentLanguage service to replace $wgContLang"

5 years agoMerge "Test ApiQuerySiteinfo"
jenkins-bot [Thu, 2 Aug 2018 02:44:38 +0000 (02:44 +0000)]
Merge "Test ApiQuerySiteinfo"

5 years agoMerge "Automatically reset namespace caches when needed"
jenkins-bot [Thu, 2 Aug 2018 02:26:33 +0000 (02:26 +0000)]
Merge "Automatically reset namespace caches when needed"

5 years agoMerge "Reset interwiki table between tests"
jenkins-bot [Thu, 2 Aug 2018 02:14:50 +0000 (02:14 +0000)]
Merge "Reset interwiki table between tests"

5 years agoMerge "New helper ApiTestCase::setExpectedApiException()"
jenkins-bot [Thu, 2 Aug 2018 02:10:59 +0000 (02:10 +0000)]
Merge "New helper ApiTestCase::setExpectedApiException()"

5 years agoMerge "travis: No longer allow failures for postgres"
jenkins-bot [Wed, 1 Aug 2018 23:55:48 +0000 (23:55 +0000)]
Merge "travis: No longer allow failures for postgres"

5 years agotravis: No longer allow failures for postgres
Kunal Mehta [Wed, 1 Aug 2018 23:33:56 +0000 (16:33 -0700)]
travis: No longer allow failures for postgres

Passing as of <https://travis-ci.org/wikimedia/mediawiki/builds/411039858>,
when PHPUnit tests that fail under postgres were temporarily disabled.

Change-Id: I569f451bc691256a1821cb557f263e49fed347f0

5 years agoMerge "Disable PHPUnit tests that fail under postgres"
jenkins-bot [Wed, 1 Aug 2018 22:50:19 +0000 (22:50 +0000)]
Merge "Disable PHPUnit tests that fail under postgres"

5 years agoMerge "Disable PHPUnit tests that fail under sqlite"
jenkins-bot [Wed, 1 Aug 2018 22:50:14 +0000 (22:50 +0000)]
Merge "Disable PHPUnit tests that fail under sqlite"

5 years agoMerge "Introduce MediaWikiTestCase::markTestSkippedIfDbType()"
jenkins-bot [Wed, 1 Aug 2018 22:50:09 +0000 (22:50 +0000)]
Merge "Introduce MediaWikiTestCase::markTestSkippedIfDbType()"

5 years agoDisable PHPUnit tests that fail under postgres
Kunal Mehta [Wed, 1 Aug 2018 07:25:32 +0000 (00:25 -0700)]
Disable PHPUnit tests that fail under postgres

So we can make the job voting, preventing other tests from regressing.
These tests can be re-enabled whenever they're made to pass.

Bug: T195807
Change-Id: I58261dd70eea3581803987a4a7739c7d55558f42

5 years agoMerge "Move generic HTMLSizeFilterField styles from newpages.less"
jenkins-bot [Wed, 1 Aug 2018 20:09:13 +0000 (20:09 +0000)]
Merge "Move generic HTMLSizeFilterField styles from newpages.less"

5 years agoMerge "SpecialNewpages: Preserve values of show/hide links on form submission"
jenkins-bot [Wed, 1 Aug 2018 20:09:07 +0000 (20:09 +0000)]
Merge "SpecialNewpages: Preserve values of show/hide links on form submission"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 1 Aug 2018 19:54:43 +0000 (21:54 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I7b11a5e557e877553594ed439f02b107d44d3c64

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 agoMove generic HTMLSizeFilterField styles from newpages.less
Bartosz Dziewoński [Wed, 1 Aug 2018 18:33:02 +0000 (20:33 +0200)]
Move generic HTMLSizeFilterField styles from newpages.less

These styles should apply to all OOUI HTMLForms (and they already were
accidentally being applied to the form on Special:ProtectedPages).
Move them to mediawiki.htmlform.ooui.styles.less.

Change-Id: Ie51fbbd997648495779c822c421bbfb4a3ea74c4

5 years agoSpecialNewpages: Preserve values of show/hide links on form submission
Bartosz Dziewoński [Wed, 1 Aug 2018 18:19:32 +0000 (20:19 +0200)]
SpecialNewpages: Preserve values of show/hide links on form submission

This was lost in 317345b0df82461cae98b72643a5443932117a86 in 2014.
If you used one of the links like "Hide registered users" or "Show
redirects" below the form, this choice would be lost after submitting
the form.

Change-Id: I14297c2322a93ed0a0745e46561b9620f1c95f6a

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 agoDon't generate RC entries for filterable log types
GeoffreyT2000 [Fri, 28 Jul 2017 01:44:21 +0000 (18:44 -0700)]
Don't generate RC entries for filterable log types

This change is needed so that filterable log types (e.g. patrol) will not get corresponding recent changes entries after running rebuildrecentchanges.php. Creation log entries will not get an RC entry regenerated either.

Bug: T20364
Change-Id: Id18364599b44d16f867f1042e1dc7e8f51b1b369

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 agoTest ApiQuerySiteinfo
Aryeh Gregor [Tue, 31 Jul 2018 16:15:17 +0000 (19:15 +0300)]
Test ApiQuerySiteinfo

Change-Id: If48395c345624bbd447f3a2d51b7914c274633f6

5 years agoAutomatically reset namespace caches when needed
Aryeh Gregor [Wed, 1 Aug 2018 12:40:47 +0000 (15:40 +0300)]
Automatically reset namespace caches when needed

This avoids error-prone code written separately in every test.  In
addition to no existing tests resetting the TitleFormatter (more
services probably need to be reset as well), they mostly reset only the
namespace cache on $wgContLang, which wouldn't help for any other
language.

The parser test runner still doesn't do this, but maybe it should.

Change-Id: I44b7a1aec48f14b0950907fa14bd0df80f674296

5 years agoImprove OutputPage test coverage more
Aryeh Gregor [Wed, 25 Jul 2018 18:41:42 +0000 (21:41 +0300)]
Improve OutputPage test coverage more

Improved locally from 26.81% to 37.18%.

Depends-On: Ib564624c644ee6620ac06872f5684831acaaaadb
Change-Id: Icdc0288c04b8c4ba841f9fbb3e05a0cdc8a20fa5

5 years agoReset interwiki table between tests
Aryeh Gregor [Tue, 31 Jul 2018 13:22:26 +0000 (16:22 +0300)]
Reset interwiki table between tests

Change-Id: I1c6d5624ffdcc7a624390336d3151e44170916e7

5 years agoNew helper ApiTestCase::setExpectedApiException()
Aryeh Gregor [Tue, 31 Jul 2018 13:19:10 +0000 (16:19 +0300)]
New helper ApiTestCase::setExpectedApiException()

This allows setting the expected exception message by the message key,
not text, so it remains correct if the message is updated.  This
function could be defined to work with other exception types too, but it
seems useful to have shortcuts for common types like ApiUsageException
or MWException.

Change-Id: Ic86278e9e1e91eea0c045d2b93342f018e1d8e66

5 years agoUpdate ServiceWiring to use ContentLanguage
Aryeh Gregor [Thu, 26 Jul 2018 11:44:11 +0000 (14:44 +0300)]
Update ServiceWiring to use ContentLanguage

Bug: T200246
Change-Id: I626030e9ad0f2a6c60bddb0b05e842eb1ac56da7

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 agoDisable PHPUnit tests that fail under sqlite
Kunal Mehta [Wed, 1 Aug 2018 07:19:43 +0000 (00:19 -0700)]
Disable PHPUnit tests that fail under sqlite

So we can make the job voting, preventing other tests from regressing.
These tests can be re-enabled whenever they're made to pass.

Change-Id: I959710138e1e1b37b6ba69561c2920a78208bf12

5 years agoIntroduce MediaWikiTestCase::markTestSkippedIfDbType()
Kunal Mehta [Wed, 1 Aug 2018 07:19:10 +0000 (00:19 -0700)]
Introduce MediaWikiTestCase::markTestSkippedIfDbType()

Helper to skip tests if they're being run with a specific DBMS where the
test currently fails.

The main use case for this is to temporarily disable failing postgres
and sqlite tests so we can make those test runs voting (so we don't
regress any further), and re-enable the tests once they've been fixed.

Change-Id: I1fd7ca6b2d21fed59ed387376d03489c7cbccdfe

5 years agoIntroduce ContentLanguage service to replace $wgContLang
Aryeh Gregor [Wed, 25 Jul 2018 14:37:16 +0000 (17:37 +0300)]
Introduce ContentLanguage service to replace $wgContLang

Bug: T200246
Depends-On: I31c2e20fc70ba3cbc124b9f462f4924a139dd9bd
Depends-On: I4aaf1c641ec6abef214eb96c0e4b42a67488ac00
Depends-On: I461cf2f441a4040bb15d6c4bb93ce6114c143845
Depends-On: I4b1cc4257348d1773fd2ccf045966261f801e7d0
Depends-On: I9790b7efdd484366dc36eb8880778aea1a559e5e
Change-Id: I193f5b9a95430b0a05573c361715e053e5411e32

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