lhc/web/wiklou.git
5 years agoexception: Correct label "Notice" for E_USER_NOTICE, not "Warning"
Timo Tijhof [Fri, 12 Oct 2018 04:05:16 +0000 (05:05 +0100)]
exception: Correct label "Notice" for E_USER_NOTICE, not "Warning"

Follows-up ef06b528d9, which fixed the severity of all PHP errors
to have severity "Warning" or higher.

However, it also accidentally changed the label of "Notice"
to "Warning", which is confusing and incorrect.

Change-Id: Iffd39aa23b7f2cbff5cdaf876b8d4d595dcd6f96

5 years agordbms: add domain sanity checks to LoadBalancer connection methods
Aaron Schulz [Wed, 15 Aug 2018 02:24:37 +0000 (19:24 -0700)]
rdbms: add domain sanity checks to LoadBalancer connection methods

Bug: T193565
Change-Id: I94d905277e01b8e30ac3f6532ece07388bb20cce

5 years agoMerge "Make MergeableUpdate jobs avoid the sub-queue so they can always merge"
jenkins-bot [Fri, 12 Oct 2018 01:13:29 +0000 (01:13 +0000)]
Merge "Make MergeableUpdate jobs avoid the sub-queue so they can always merge"

5 years agoMerge "Make merged MergeableUpdate items always go to the end of the queue"
jenkins-bot [Fri, 12 Oct 2018 00:58:59 +0000 (00:58 +0000)]
Merge "Make merged MergeableUpdate items always go to the end of the queue"

5 years agoMerge "Fix Setup.php file-scope test"
jenkins-bot [Fri, 12 Oct 2018 00:58:54 +0000 (00:58 +0000)]
Merge "Fix Setup.php file-scope test"

5 years agoMake MergeableUpdate jobs avoid the sub-queue so they can always merge
Aaron Schulz [Thu, 11 Oct 2018 22:11:50 +0000 (15:11 -0700)]
Make MergeableUpdate jobs avoid the sub-queue so they can always merge

Change-Id: I5b100fae29b785ab4524d165dad2e8ee46406b0c

5 years agoIncrease OutputPage test coverage to >45%
Aryeh Gregor [Thu, 2 Aug 2018 18:42:17 +0000 (21:42 +0300)]
Increase OutputPage test coverage to >45%

Also stop returning a value from OutputPage::adaptCdnTTL().  There are
no users and the value doesn't seem very helpful: one would probably
expect it to return the new value of mCdnMaxage, but instead it
returns the new value of mCdnMaxageLimit. Better to have no return
value than one that's easily misunderstood (*and* which nobody uses).

Change-Id: Ia9dab86923b839334eab9f6fde17c4aed52130ec

5 years agoMerge "Add join conditions to ActiveUsersPager"
jenkins-bot [Thu, 11 Oct 2018 22:11:53 +0000 (22:11 +0000)]
Merge "Add join conditions to ActiveUsersPager"

5 years agoMerge "resourceloader: Throw exception when config serialization fails"
jenkins-bot [Thu, 11 Oct 2018 22:11:47 +0000 (22:11 +0000)]
Merge "resourceloader: Throw exception when config serialization fails"

5 years agoMake merged MergeableUpdate items always go to the end of the queue
Aaron Schulz [Thu, 11 Oct 2018 21:51:36 +0000 (14:51 -0700)]
Make merged MergeableUpdate items always go to the end of the queue

Change-Id: I2e8aa28f7426470d9b8b9e11b902deea793069b3

5 years agoresourceloader: Throw exception when config serialization fails
Roan Kattouw [Tue, 9 Oct 2018 20:43:56 +0000 (13:43 -0700)]
resourceloader: Throw exception when config serialization fails

If something puts a string that's invalid UTF-8 in a JS config variable,
JSON serialization will fail on the entire config blob. Currently, this
causes the entire config blob to be silently dropped, which breaks all
JavaScript because elementary variables like wgPageName are missing.

This change makes this scenario fail loudly rather than quietly, by
throwing an exception. This also makes bugs like these easier to track
down.

Bug: T206475
Change-Id: Ief2ae00228389a23627d440dc1cd9a54cf2b6926

5 years agoMerge "MessageCache: replace should actually replace, not reload"
jenkins-bot [Thu, 11 Oct 2018 20:56:33 +0000 (20:56 +0000)]
Merge "MessageCache: replace should actually replace, not reload"

5 years agoMerge "Localisation updates from https://translatewiki.net."
jenkins-bot [Thu, 11 Oct 2018 20:46:47 +0000 (20:46 +0000)]
Merge "Localisation updates from https://translatewiki.net."

5 years agoMerge "Accept BCP 47 codes as aliases for nonstandard variants"
jenkins-bot [Thu, 11 Oct 2018 20:46:42 +0000 (20:46 +0000)]
Merge "Accept BCP 47 codes as aliases for nonstandard variants"

5 years agoMerge "Ensure LanguageCode::bcp47() returns a valid BCP 47 language code"
jenkins-bot [Thu, 11 Oct 2018 20:46:35 +0000 (20:46 +0000)]
Merge "Ensure LanguageCode::bcp47() returns a valid BCP 47 language code"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 11 Oct 2018 20:14:07 +0000 (22:14 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I17af87ea492359cd0c09dc3c62af8caa8755368a

5 years agoSplit out getSlotParserOutputUncached() method for the sake of profiling
Aaron Schulz [Thu, 11 Oct 2018 17:39:05 +0000 (10:39 -0700)]
Split out getSlotParserOutputUncached() method for the sake of profiling

Change-Id: I553dba13486982b4530d290c84dc1f53b4df6ff9

5 years agoMerge "Allow and use type Language instead of string for $lang of doEditSectionLink"
jenkins-bot [Thu, 11 Oct 2018 19:52:13 +0000 (19:52 +0000)]
Merge "Allow and use type Language instead of string for $lang of doEditSectionLink"

5 years agoMerge ".mailmap: Add a few new entries"
jenkins-bot [Thu, 11 Oct 2018 19:52:02 +0000 (19:52 +0000)]
Merge ".mailmap: Add a few new entries"

5 years agoMerge "Drop ParserLimitReport, deprecated in 1.22"
jenkins-bot [Thu, 11 Oct 2018 19:47:10 +0000 (19:47 +0000)]
Merge "Drop ParserLimitReport, deprecated in 1.22"

5 years agoMerge "Drop UnknownAction, deprecated in 1.19(!)"
jenkins-bot [Thu, 11 Oct 2018 19:44:16 +0000 (19:44 +0000)]
Merge "Drop UnknownAction, deprecated in 1.19(!)"

5 years agoMerge "Drop wfRunHooks, deprecated since 1.25"
jenkins-bot [Thu, 11 Oct 2018 19:41:18 +0000 (19:41 +0000)]
Merge "Drop wfRunHooks, deprecated since 1.25"

5 years agoMerge "Drop UserGetImplictGroups, deprecated since 1.25"
jenkins-bot [Thu, 11 Oct 2018 19:41:13 +0000 (19:41 +0000)]
Merge "Drop UserGetImplictGroups, deprecated since 1.25"

5 years agoAdd join conditions to ActiveUsersPager
Brad Jorsch [Fri, 21 Sep 2018 18:32:34 +0000 (14:32 -0400)]
Add join conditions to ActiveUsersPager

We're (very slowly and somewhat unofficially) moving towards using join
conditions everywhere, and here they're needed to avoid errors once the
actor migration reaches the READ_NEW stage.

Bug: T204767
Change-Id: I8bfe861fac7874f8938bed9bfac3b7ec6f478238

5 years agoMerge "Drop DoEditSectionLink, deprecated since 1.25"
jenkins-bot [Thu, 11 Oct 2018 19:27:39 +0000 (19:27 +0000)]
Merge "Drop DoEditSectionLink, deprecated since 1.25"

5 years agoMerge "tests: Add helper function for ini_set with automatic cleanup"
jenkins-bot [Thu, 11 Oct 2018 19:05:51 +0000 (19:05 +0000)]
Merge "tests: Add helper function for ini_set with automatic cleanup"

5 years agoMerge "Load installer i18n when running update.php"
jenkins-bot [Thu, 11 Oct 2018 18:59:34 +0000 (18:59 +0000)]
Merge "Load installer i18n when running update.php"

5 years agoMerge "messagecache: avoid caching message pages that do not override"
jenkins-bot [Thu, 11 Oct 2018 18:59:24 +0000 (18:59 +0000)]
Merge "messagecache: avoid caching message pages that do not override"

5 years agoMerge "Do not retry the ThumbnailRenderJob."
jenkins-bot [Thu, 11 Oct 2018 18:32:40 +0000 (18:32 +0000)]
Merge "Do not retry the ThumbnailRenderJob."

5 years agoLoad installer i18n when running update.php
Reedy [Thu, 11 Oct 2018 18:20:30 +0000 (19:20 +0100)]
Load installer i18n when running update.php

Bug: T206765
Change-Id: Ie1c1a5dbf7c905eaca55777448e5aba00267ed31

5 years agoMerge "Revert "Unwrap HTML loaded from parser cache""
jenkins-bot [Thu, 11 Oct 2018 18:11:55 +0000 (18:11 +0000)]
Merge "Revert "Unwrap HTML loaded from parser cache""

5 years ago.mailmap: Add a few new entries
James D. Forrester [Wed, 10 Oct 2018 23:34:43 +0000 (16:34 -0700)]
.mailmap: Add a few new entries

Change-Id: Iaacd5eff9c01ae9c03cf002a5063cae78cfb9e37

5 years agoAllow and use type Language instead of string for $lang of doEditSectionLink
Fomafix [Wed, 30 May 2018 04:33:01 +0000 (06:33 +0200)]
Allow and use type Language instead of string for $lang of doEditSectionLink

Hard-deprecate that the parameters $tooltip and $lang are optional.
Hard-deprecate other types than Language for parameter $lang.

Change-Id: I3ce048e3d0de9a4e96e2aa05d75a4ce41c3ec964
Depends-On: Ibe295e7020e995eea52e319feaf59c635f8bb4dc

5 years agoDo not retry the ThumbnailRenderJob.
Petr Pchelko [Thu, 11 Oct 2018 15:19:41 +0000 (08:19 -0700)]
Do not retry the ThumbnailRenderJob.

The job is a warmup for the thumbnail cache, so loosing it is not
an issue. Most of the times thumbnail rendering fails because of
non-renderable or broken images, or because the thumbnail was
already created by a request. These conditions will not be fixed
by retrying, will only create more load on Thumbor.

Bug: T203135
Change-Id: Ib4640eb13ca93f7350ff0671fc559a76ebbbb1e9

5 years agoMessageCache: replace should actually replace, not reload
Brad Jorsch [Wed, 26 Sep 2018 16:56:58 +0000 (12:56 -0400)]
MessageCache: replace should actually replace, not reload

Prior to I462554b30, MessageCache::replace() did just that: it took the
existing cache and updated the one entry.

In I462554b30, the rearrangement of work into a DeferredUpdate
introduced a bug: the in-process cache was updated, but when the shared
cache was loaded later the entry was never updated in there so the
shared caches kept the old value. This was found in code review and
worked around by reloading all the messages from the database instead of
updating the existing cache.

But all that extra work reloading everything from the database causes
major slowness saving any MediaWiki-namespace page when the wiki has
many such small pages. Let's go back and fix the bug so replace() can
again replace instead of reloading everything.

Bug: T203925
Change-Id: Ife8e1bd6f143f480eb8da09b817c85aadf33a923

5 years agoOnly expand `{{...}}` in messages once
C. Scott Ananian [Thu, 11 Oct 2018 13:05:05 +0000 (09:05 -0400)]
Only expand `{{...}}` in messages once

If we're going to call `OutputPage::addWikiText` to parse the message,
we don't need to pre-expand `{{...}}` markup before passing it to the
parser.  This makes these callsites consistent with how
`OutputPage::addWikiMsg()` inserts messages.

Bug: T206574
Change-Id: I2f68f73365df876e6f9d017e4e3ddea39c4a1284

5 years ago[Korean] Add 2 additional bookstoreList
Yongmin Hong [Thu, 11 Oct 2018 09:13:48 +0000 (18:13 +0900)]
[Korean] Add 2 additional bookstoreList

* Aladin.co.kr has HTTPS!
* National Library of Korea has 302 http://www.nl.go.kr on
  https://www.nl.go.kr
* Naver has HTTPS.

Change-Id: I5559ae2b32cddb540bc712e4b55cfe7c26c9a0b0
Signed-off-by: Yongmin Hong <revi@pobox.com>
5 years agoMerge "Drop File / MediaHandler::getStreamHeaders(), deprecated since 1.30"
jenkins-bot [Thu, 11 Oct 2018 07:44:08 +0000 (07:44 +0000)]
Merge "Drop File / MediaHandler::getStreamHeaders(), deprecated since 1.30"

5 years agoMerge "Drop DeferredUpdates::setImmediateMode(), deprecated since 1.29"
jenkins-bot [Thu, 11 Oct 2018 07:44:02 +0000 (07:44 +0000)]
Merge "Drop DeferredUpdates::setImmediateMode(), deprecated since 1.29"

5 years agoMerge "Drop ChangesListSpecialPageFilters, deprecated in 1.29 and uncalled"
jenkins-bot [Thu, 11 Oct 2018 07:36:20 +0000 (07:36 +0000)]
Merge "Drop ChangesListSpecialPageFilters, deprecated in 1.29 and uncalled"

5 years agoAccept BCP 47 codes as aliases for nonstandard variants
C. Scott Ananian [Tue, 3 Jul 2018 20:12:38 +0000 (16:12 -0400)]
Accept BCP 47 codes as aliases for nonstandard variants

The browser Accept-Language header uses BCP 47 codes, which don't
precisely match our internal mediawiki variant names in a number of
places.  Allow proper BCP 47 codes to alias our internal variants
for: Accept-Language parsing, URL parsing, user preferences, and
explicit enumeration of codes in LanguageConverter rules.

This is a replay of an earlier merged patch,
0818070c59eb4e8330496796b943951c01c7a573, which had to be reverted
because it was based on 8380f0173e79b66f0e2afd6c49cd88afb9f4f6f3 which
caused regressions in the Babel extension (T199941).

Change-Id: Ica89d9547c58967747ab0fa15d4e83be5378796d

5 years agoEnsure LanguageCode::bcp47() returns a valid BCP 47 language code
C. Scott Ananian [Tue, 26 Jun 2018 20:39:57 +0000 (16:39 -0400)]
Ensure LanguageCode::bcp47() returns a valid BCP 47 language code

MediaWiki uses a number of nonstandard codes which do not validate
according to the IANA language subtag registry.  Some of them have
the wrong semantics entirely: MediaWiki's `sr-ec` variant maps to
BCP 47 `sr-EC` which is "Serbian as used in Ethiopia" (!).

Extend LanguageCode::bcp47() to map our nonstandard codes to valid
BCP 47 language codes.  Export the mapping so that it can be used
in JavaScript's corresponding mw.language.bcp47() implementation
as well, and return the standard BCP 47 codes in the siteinfo
API.

Thanks to TheDJ (I10b4473c7e53f027812bbccf26bb47aec15fddfd) and
Fomafix (I93efc190714ba76247d30ba49fc21ae872fc3555) for previous
attempts at this!

Also removed a fixme for the name of 'Twi', dating back to 2004
(f59c3be23b209e178a917cb14ebedcc243c847b6) -- checking
tw.wikipedia.org it certainly appears that the autonym of 'Twi'
is correctly 'Twi'.

Tracking bugs for invalid language codes are T125073 and T145535.
Discussion of zh-XX => zh-HanX-XX mapping is at T198419.

This is a replay of an earlier merged patch,
8380f0173e79b66f0e2afd6c49cd88afb9f4f6f3, which had to be reverted
because it caused regressions in the Babel extension (T199941).

Bug: T34483
Bug: T106367
Bug: T120847
Depends-On: I27a5b8e45b34c6b57c1b612b11548001c88cd483
Change-Id: Iebbc604af21d7f2af9c1f1ab2574cb5f309bf6ed

5 years agoMerge "install.php: Allow extensions and skins to be specified"
jenkins-bot [Thu, 11 Oct 2018 05:34:33 +0000 (05:34 +0000)]
Merge "install.php: Allow extensions and skins to be specified"

5 years agotests: Add helper function for ini_set with automatic cleanup
Kunal Mehta [Thu, 11 Oct 2018 05:31:37 +0000 (22:31 -0700)]
tests: Add helper function for ini_set with automatic cleanup

Some tests need to change the value of an ini setting, and typically implement
cleanup handling themselves, usually imperfectly.

Provide a helper function, $this->setIniSetting(), which will take care of
teardown in the same way that $this->setMwGlobals() does.

Change-Id: I7be4198592f0aaf73a28d3c60acb307a918b1a1f

5 years agoMerge "Hard-deprecate hooks APIGetDescription and APIGetParamDescription"
jenkins-bot [Thu, 11 Oct 2018 05:30:09 +0000 (05:30 +0000)]
Merge "Hard-deprecate hooks APIGetDescription and APIGetParamDescription"

5 years agoMerge "WikiPage: Fix viewing of wiki redirects to NS_MEDIA"
jenkins-bot [Thu, 11 Oct 2018 01:54:19 +0000 (01:54 +0000)]
Merge "WikiPage: Fix viewing of wiki redirects to NS_MEDIA"

5 years agoWikiPage: Fix viewing of wiki redirects to NS_MEDIA
Alex Ezell [Tue, 9 Oct 2018 15:51:04 +0000 (11:51 -0400)]
WikiPage: Fix viewing of wiki redirects to NS_MEDIA

If a user creates a redirect to a Media namespace title, a fatal
error is thrown on viewing such rediect because we protect against
redirecting to virtual namespaces. This fix catches this kind of
redirect and modifies the namespace to be File before the Title object
is created.

Follow-up from 613e2699.

Bug: T203942
Change-Id: Ib211d98498f635862fea6bf3e7395f4f8718b3d8

5 years agoActorMigration: Remove possibility of read-both
Brad Jorsch [Tue, 18 Sep 2018 18:21:20 +0000 (14:21 -0400)]
ActorMigration: Remove possibility of read-both

When this was originally written, the plan was to read both the old and
new fields during the transition period, while stopping writes to them
midway through. It turns out that the WHERE conditions to do read-both
correctly are generally not handled well by the database and working
around that would require a lot of complicated code (see what's being
removed from ApiQueryUserContribs here, for example).

We can simplify things greatly by instead having it write both fields
during the transition period, reading from the old for the first part
and the new for the second part, as is being done for MCR.

Bug: T204669
Change-Id: I4764c1c7883dc1003cb12729455c8107319f70b1
Depends-On: I845f6ae462f2539ebd35cbb5f2ca8b5714e2c1fb
Depends-On: I88b31b977543fdbdf69f8c1158e77e448df94e11

5 years agoHTMLInfoField: Undo breaking change, deprecate instead, add release notes
Bartosz Dziewoński [Tue, 2 Oct 2018 21:22:00 +0000 (23:22 +0200)]
HTMLInfoField: Undo breaking change, deprecate instead, add release notes

Follow-up to e6eb87ae2028d9d3f9317d75cced42511ed97b9e.

Bug: T203202
Bug: T205956
Change-Id: I2d19d376d218c59e4ea36e8635e883afac2adea6

5 years agoMerge "Drop wfUsePHP, deprecated in 1.30 and unused"
jenkins-bot [Wed, 10 Oct 2018 23:49:37 +0000 (23:49 +0000)]
Merge "Drop wfUsePHP, deprecated in 1.30 and unused"

5 years agoMerge "Fix TitlePermissionTest failures due to test leakage"
jenkins-bot [Wed, 10 Oct 2018 23:36:02 +0000 (23:36 +0000)]
Merge "Fix TitlePermissionTest failures due to test leakage"

5 years agoMerge "rdbms: Database::selectDB() update the domain and handle failure better"
jenkins-bot [Wed, 10 Oct 2018 23:20:49 +0000 (23:20 +0000)]
Merge "rdbms: Database::selectDB() update the domain and handle failure better"

5 years agoDrop ParserLimitReport, deprecated in 1.22
James D. Forrester [Wed, 10 Oct 2018 23:20:18 +0000 (16:20 -0700)]
Drop ParserLimitReport, deprecated in 1.22

Change-Id: I4898d92569bd823f09c12f68fa186e2e139790a7

5 years agoDrop UnknownAction, deprecated in 1.19(!)
James D. Forrester [Wed, 10 Oct 2018 23:17:28 +0000 (16:17 -0700)]
Drop UnknownAction, deprecated in 1.19(!)

Change-Id: Ia75552e69c07f6dc5da2f1e04ea813c912b04aef

5 years agoFix TitlePermissionTest failures due to test leakage
Aaron Schulz [Wed, 10 Oct 2018 04:41:51 +0000 (21:41 -0700)]
Fix TitlePermissionTest failures due to test leakage

Bug: T201776
Change-Id: I46d44c031ec45ac0be4c372891d2992c1e4f35ab

5 years agoMerge "Minor OrderedStreamingForkController improvements"
jenkins-bot [Wed, 10 Oct 2018 22:41:57 +0000 (22:41 +0000)]
Merge "Minor OrderedStreamingForkController improvements"

5 years agoDrop wfRunHooks, deprecated since 1.25
James D. Forrester [Wed, 10 Oct 2018 22:28:49 +0000 (15:28 -0700)]
Drop wfRunHooks, deprecated since 1.25

Change-Id: I0350fba3f1a4a4ff500af746609bc9c6b46f0bdf

5 years agoDrop UserGetImplictGroups, deprecated since 1.25
James D. Forrester [Wed, 10 Oct 2018 22:28:34 +0000 (15:28 -0700)]
Drop UserGetImplictGroups, deprecated since 1.25

Change-Id: Iffe29131fcc85d3477fe93508902d8ea982289f5

5 years agoDrop DoEditSectionLink, deprecated since 1.25
James D. Forrester [Wed, 10 Oct 2018 22:19:56 +0000 (15:19 -0700)]
Drop DoEditSectionLink, deprecated since 1.25

Change-Id: I78b468da34467863047cd01623997dc67cc4fc76

5 years agoDrop File / MediaHandler::getStreamHeaders(), deprecated since 1.30
James D. Forrester [Wed, 10 Oct 2018 22:17:16 +0000 (15:17 -0700)]
Drop File / MediaHandler::getStreamHeaders(), deprecated since 1.30

Change-Id: Ia4f6cee5674a492c098c343943095cb668172311

5 years agoDrop DeferredUpdates::setImmediateMode(), deprecated since 1.29
James D. Forrester [Wed, 10 Oct 2018 22:17:00 +0000 (15:17 -0700)]
Drop DeferredUpdates::setImmediateMode(), deprecated since 1.29

Change-Id: I8ae7dedf956034981081d2bcec630d6724921269

5 years agoDrop ChangesListSpecialPageFilters, deprecated in 1.29 and uncalled
James D. Forrester [Wed, 10 Oct 2018 22:10:18 +0000 (15:10 -0700)]
Drop ChangesListSpecialPageFilters, deprecated in 1.29 and uncalled

Change-Id: I03a9bce0d1085dc30dbc5c3408b4cea154ade19a

5 years agoDrop wfUsePHP, deprecated in 1.30 and unused
James D. Forrester [Wed, 10 Oct 2018 22:04:51 +0000 (15:04 -0700)]
Drop wfUsePHP, deprecated in 1.30 and unused

Change-Id: Ic247af4e9b2b2e687ee74e990e69401426be7c31

5 years agoMerge "RCFilters: Improve circle mixin and change to new standard icon size"
jenkins-bot [Wed, 10 Oct 2018 22:09:02 +0000 (22:09 +0000)]
Merge "RCFilters: Improve circle mixin and change to new standard icon size"

5 years agoMinor OrderedStreamingForkController improvements
Timo Tijhof [Wed, 10 Oct 2018 19:17:37 +0000 (20:17 +0100)]
Minor OrderedStreamingForkController improvements

Follows-up c94dea7029cae.

* Avoid strlen() where a strict check suffices.
* Use substr() for both comparison and stripping, avoid
  potentially expensive, but also fragile, because strlen()-1
  can  produce $str[-1], which would
  > PHP Notice:  Uninitialized string offset: -1
  Luckily, the implied null would work as expected, given that
  `null !== "\n"` and produces the same result.

Change-Id: If61e5e412aaa2dc7c00c4441b3b7bd5f04160ec8

5 years agoMerge "Remove pear/mail_mime-decode"
jenkins-bot [Wed, 10 Oct 2018 20:58:50 +0000 (20:58 +0000)]
Merge "Remove pear/mail_mime-decode"

5 years agoMerge "Hard deprecate OutputPage::addWikiText*Tidy() methods"
jenkins-bot [Wed, 10 Oct 2018 20:14:12 +0000 (20:14 +0000)]
Merge "Hard deprecate OutputPage::addWikiText*Tidy() methods"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 10 Oct 2018 19:55:03 +0000 (21:55 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I9682ae829e3659b2cf672847961c3be3d8578568

5 years agoRemove pear/mail_mime-decode
Reedy [Wed, 10 Oct 2018 17:41:00 +0000 (18:41 +0100)]
Remove pear/mail_mime-decode

Bug: T109121
Change-Id: I540b8a59dbe88c27f49b3c4cd8740872afd5d8bf

5 years agomessagecache: avoid caching message pages that do not override
Aaron Schulz [Tue, 2 Oct 2018 17:59:28 +0000 (10:59 -0700)]
messagecache: avoid caching message pages that do not override

Clean up individual message cache handling when the master key is
volatile. The goal is not to treat the message as gone but to re-fetch
it when accessed rather than cache the value in the main/process cache.

Bug: T193271
Change-Id: I4bcaf10c1516e7c96c2d0963722affeaf80272e0

5 years agoRCFilters: Improve circle mixin and change to new standard icon size
Volker E [Sun, 8 Apr 2018 03:20:20 +0000 (20:20 -0700)]
RCFilters: Improve circle mixin and change to new standard icon size

Improve circle mixin, variables and apply standard icon size:
- Apply new icon size of 20px,
- Divert `.mw-rcfilters-mixin-circle()` into two mixins, applying former
only on circle classes to not repeat output of shared properties for
each color,
- Add new parameter to apply `px` based `min-width`/`min-height` to
circumvent rendering issues,
- Rename variables for unification with WikimediaUI Base vars and easier
readability

Bug: T190980
Change-Id: I76fec57ff237ba02afefcea28916d8348bac9b0e

5 years agordbms: Database::selectDB() update the domain and handle failure better
Aaron Schulz [Tue, 14 Aug 2018 23:44:41 +0000 (16:44 -0700)]
rdbms: Database::selectDB() update the domain and handle failure better

LoadBalancer uses Database::getDomainId() for deciding which keys to use
in the foreign connection handle arrays. This method should reflect any
changes made to the DB selection.

If the query fails, then do not change domain field. This is the sort of
approach that LoadBalancer is expects in openForeignConnection(). Also,
throw an exception when selectDB() fails.

The db/schema/prefix fields of Database no longer exist in favor of just
using the newer currentDomain field.

Also:
* Add IDatabase::selectDomain() method and made selectDB() wrap it.
* Extract the DB name from sqlite files if not explicitly provided.
* Fix inconsistent open() return values from Database subclasses.
* Make a relationSchemaQualifier() method to handle the concern of
  omitting schema names in queries. The means that getDomainId() can
  still return the right value, rather than confusingly omitt the schema.
* Make RevisionStore::checkDatabaseWikiId() account for the domain schema.
  Unlike d2a4d614fce09c, this does not incorrectly assume the storage is
  always for the current wiki domain. Also, LBFactorySingle sets the local
  domain so it is defined even in install.php.
* Make RevisionStoreDbTestBase actually set the LoadBalancer local domain.
* Make RevisionTest::testLoadFromTitle() account for the domain schema.

Bug: T193565
Change-Id: I6e51cd54c6da78830b38906b8c46789c79498ab5

5 years agoHard deprecate OutputPage::addWikiText*Tidy() methods
C. Scott Ananian [Wed, 26 Sep 2018 17:22:38 +0000 (13:22 -0400)]
Hard deprecate OutputPage::addWikiText*Tidy() methods

These have been replaced with OutputPage::addWikiTextAsContent().
There is only one apparent use outside core, in the ProofreadPage
extension.

Bug: T198214
Depends-On: I826e463c1623481c11156a55a5b7e1da0aa27b8b
Change-Id: I4b1a9429029bfbbf70b2d5da1b290319ecbbdf3a

5 years agoHard deprecate unused OutputPage::addWikiText* methods
C. Scott Ananian [Fri, 21 Sep 2018 17:16:42 +0000 (13:16 -0400)]
Hard deprecate unused OutputPage::addWikiText* methods

Codesearch shows no users of `OutputPage::addWikiTextWithTitle()`,
and no users of `OutputPage::addWikiTextTitle()` (other than the
implicit uses by the other `OutputPage::addWikiText*()` methods).

These methods produce untidy output, which future parsers won't
support.

Bug: T198214
Change-Id: Id5ee3bdfa6c464e3a92af82af7bc7317ca9d07a9

5 years agoUpdate users of deprecated OutputPage::addWikiText*Tidy() methods
C. Scott Ananian [Wed, 26 Sep 2018 17:17:14 +0000 (13:17 -0400)]
Update users of deprecated OutputPage::addWikiText*Tidy() methods

This is a follow-up to Ia58910164baaca608cea3b24333b7d13ed773339 which
added new & improved names for the addWikiText*Tidy() methods.

Bug: T198214
Depends-On: I42d198e6d03afd5b976da741f235c175bfe9f767
Change-Id: I1993c2009e861fdb45c9b1bd42eab1e28a776d9a

5 years agoDeprecate and rename OutputPage::addWikiText* methods
C. Scott Ananian [Fri, 21 Sep 2018 16:24:57 +0000 (12:24 -0400)]
Deprecate and rename OutputPage::addWikiText* methods

Tidy will always be enabled with our future parsers, and it is fast
and pure PHP now with the Remex implementation, so deprecate all the
untidy variants of 'OutputPage::addWikiText*()' and add new methods
which tidy by default.  Clarify the content language/interface
language distinction while we're at it by adding 'AsInterface' to the
name of methods which use the "interface language" by default,
and renaming the 'addWikiText*Tidy' methods to
'addWikiTextAsContent'.

The 'OutputPage::addWikiTextTitle' method has been deprecated, but it
is still used internally as the implementation for the newly-added
methods.  It is expected that the shared implementation will move in
the future to a new private method.  Setting the `$tidy` parameter of
`OutputPage::addWikiTextTitle` to false is independently deprecated;
for backwards-compatibility with old MW releases you may wish to
continue to invoke OutputPage::addWikiTextTitle() but set $tidy=true;
this will result in the same tidied output that the newly added
methods would produce.

Bug: T198214
Change-Id: Ia58910164baaca608cea3b24333b7d13ed773339

5 years agoHard-deprecate hooks APIGetDescription and APIGetParamDescription
Brad Jorsch [Wed, 10 Oct 2018 17:08:31 +0000 (13:08 -0400)]
Hard-deprecate hooks APIGetDescription and APIGetParamDescription

Deprecated since MW 1.25.

Change-Id: Idf376b64490eaf8cf5a1b5c3a807fe74b3c2852c
Depends-On: I0bc394f11fda5f0118904756b99f1681897cd6fd

5 years agoAdd pear/Net_SMTP 1.8.0 to composer dependencies
Mark A. Hershberger [Tue, 24 Jul 2018 16:36:46 +0000 (12:36 -0400)]
Add pear/Net_SMTP 1.8.0 to composer dependencies

Bug: T200254
Change-Id: I231759a1e0bd5b8750939acaad85ed327d052b79

5 years agoMerge "ChangeTagsTest: Mark tables as "used" to avoid ID reuse"
jenkins-bot [Wed, 10 Oct 2018 17:37:17 +0000 (17:37 +0000)]
Merge "ChangeTagsTest: Mark tables as "used" to avoid ID reuse"

5 years agoMerge "Use non-deprecated login in ApiLoginTest"
jenkins-bot [Wed, 10 Oct 2018 15:49:04 +0000 (15:49 +0000)]
Merge "Use non-deprecated login in ApiLoginTest"

5 years agoMerge "Improve ApiLogin test coverage"
jenkins-bot [Wed, 10 Oct 2018 15:48:59 +0000 (15:48 +0000)]
Merge "Improve ApiLogin test coverage"

5 years agoMerge "resources: Update CLDRPluralRuleParser to v1.3.2-pre"
Nikerabbit [Wed, 10 Oct 2018 14:55:05 +0000 (14:55 +0000)]
Merge "resources: Update CLDRPluralRuleParser to v1.3.2-pre"

5 years agoUse non-deprecated login in ApiLoginTest
Aryeh Gregor [Tue, 9 Oct 2018 18:32:01 +0000 (21:32 +0300)]
Use non-deprecated login in ApiLoginTest

Change-Id: I62c7bfce88aeda7ec1429493e733f868887976a9

5 years agoImprove ApiLogin test coverage
Aryeh Gregor [Mon, 8 Oct 2018 13:30:13 +0000 (16:30 +0300)]
Improve ApiLogin test coverage

Coverage is 100% except for one session-related bit that seems a bit
involved to test right now.  It looks like it will be easier once
SessionManager becomes a service.

I removed the third parameter from the return value of
canonicalizeLoginData, since af37a4c7 made it always return true.

I also removed three lines of dead code from ApiLogin.php.

Change-Id: Ia0073eddd27c82827518e0031e3c313f83cfd7cc

5 years agoMerge "Hard-deprecate authentication-related hooks deprecated by AuthManager"
jenkins-bot [Wed, 10 Oct 2018 05:54:03 +0000 (05:54 +0000)]
Merge "Hard-deprecate authentication-related hooks deprecated by AuthManager"

5 years agoMerge "Re-namespace RevisionStore and RevisionRecord classes"
jenkins-bot [Wed, 10 Oct 2018 05:16:45 +0000 (05:16 +0000)]
Merge "Re-namespace RevisionStore and RevisionRecord classes"

5 years agoMerge "Use job queue for deletion of pages with many revisions"
jenkins-bot [Wed, 10 Oct 2018 04:55:53 +0000 (04:55 +0000)]
Merge "Use job queue for deletion of pages with many revisions"

5 years agoMerge "Tests: Simplify badaccess group check for patrol action"
jenkins-bot [Wed, 10 Oct 2018 04:24:33 +0000 (04:24 +0000)]
Merge "Tests: Simplify badaccess group check for patrol action"

5 years agoMerge "Revert "Replace Media namespace redirects with File namespace""
jenkins-bot [Wed, 10 Oct 2018 04:00:42 +0000 (04:00 +0000)]
Merge "Revert "Replace Media namespace redirects with File namespace""

5 years agoTests: Simplify badaccess group check for patrol action
Kosta Harlan [Thu, 4 Oct 2018 13:52:41 +0000 (09:52 -0400)]
Tests: Simplify badaccess group check for patrol action

The important part of the assertion is badaccess-groups, so we can drop the
other components and simplify the test code, plus also work around database
name issues that caused Travis CI to fail.

Bug: T206130
Change-Id: I137be892a611cd1f2d61baa77ad9528659587adf

5 years agoinstall.php: Allow extensions and skins to be specified
Tim Starling [Wed, 19 Sep 2018 05:43:14 +0000 (15:43 +1000)]
install.php: Allow extensions and skins to be specified

Allow the extensions and skins installed by maintenance/install.php to
be customised using --skins= and --extensions=. If the argument is
am empty string then no extensions/skins are installed. For backwards
compatibility, the default is to install all skins, but to install all
extensions only if --with-extensions is given.

The new CLI options may be specified multiple times, but for
convenience, comma-separated lists can also be used.

Also:
* Rename $option to $options
* If an extension has a dependency error, propagate the very readable
  error message generated by ExtensionRegistry back to the user.
* Split getExtensionInfo() from the loop body of findExtensionsByType(),
  so that CliInstaller can use it to validate its parameters and get
  error messages.
* I didn't like the idea of removing the "s" from the directory name in
  order to construct the JSON file name, so I split
  findExtensionsByType() from findExtensions(), with the former not
  having this hack. In findExtensions(), make the previous assumption
  that the directory name is always "extensions" or "skins" explicit,
  throwing an exception if it is otherwise.

Change-Id: Id0fb63cd4e61a047ef3396ee1c38d6073dfc7fd1

5 years agoMerge "Remove ugly function existence check"
jenkins-bot [Wed, 10 Oct 2018 01:52:53 +0000 (01:52 +0000)]
Merge "Remove ugly function existence check"

5 years agoMerge "Fix index name in comment to "PHP_INFO""
jenkins-bot [Wed, 10 Oct 2018 01:43:48 +0000 (01:43 +0000)]
Merge "Fix index name in comment to "PHP_INFO""

5 years agoHard-deprecate authentication-related hooks deprecated by AuthManager
Gergő Tisza [Wed, 19 Sep 2018 22:19:59 +0000 (15:19 -0700)]
Hard-deprecate authentication-related hooks deprecated by AuthManager

Hard-deprecates AbortAutoAccount, AbortNewAccount, AbortLogin,
LoginUserMigrated, UserCreateForm, and UserLoginForm.

Change-Id: Ibb267def9c295997ef71d820ff482e1e6a816873

5 years agosinonjs: Update from 1.17.3 to 1.17.7
Timo Tijhof [Mon, 24 Sep 2018 01:47:47 +0000 (02:47 +0100)]
sinonjs: Update from 1.17.3 to 1.17.7

Upstream Sinon.JS no longer supports the pre-2.x v1.17 branch
anymore but there have been a few post-2.0 releases to address
bugs in v1.17 that we can still benefit from.

https://github.com/sinonjs/sinon/blob/v1.17.7/Changelog.txt

Notable changes include:

* Fix Blob feature test to support running tests on Safari 9.
* Avoid calls to object-local 'hasOwnProperty'.
* Improve error messages and stricter signature/type checks so
  that debugging code is easier when things go wrong.
* Fix various gaps in the XHR mock.
* Misc fixes for Node.js support.

Also remove outdated comment about ie-hacks from Sinon 1.15.

Change-Id: I66d1b461465b92798ad7eb2efcf4df2731cc78a4

5 years agoMerge "RCFilters: Override frameless button opacity to show real highlight color"
jenkins-bot [Tue, 9 Oct 2018 21:55:55 +0000 (21:55 +0000)]
Merge "RCFilters: Override frameless button opacity to show real highlight color"

5 years agoMerge "Use <div> wrappers instead of <p> in ProtectionForm"
jenkins-bot [Tue, 9 Oct 2018 20:38:31 +0000 (20:38 +0000)]
Merge "Use <div> wrappers instead of <p> in ProtectionForm"

5 years agoMerge "Localisation updates from https://translatewiki.net."
jenkins-bot [Tue, 9 Oct 2018 19:56:22 +0000 (19:56 +0000)]
Merge "Localisation updates from https://translatewiki.net."

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 9 Oct 2018 19:54:03 +0000 (21:54 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ia87e35c10f78bea2f7107605bb1adcc00acccbd6

5 years agoMerge "RCFilters: Apply `pointer` cursor on Hamburger menu"
jenkins-bot [Tue, 9 Oct 2018 19:52:34 +0000 (19:52 +0000)]
Merge "RCFilters: Apply `pointer` cursor on Hamburger menu"