lhc/web/wiklou.git
8 years agoMerge "OOUIHTMLForm: s/else if/elseif/"
jenkins-bot [Wed, 23 Sep 2015 20:46:58 +0000 (20:46 +0000)]
Merge "OOUIHTMLForm: s/else if/elseif/"

8 years agoMerge "Terminate free external link on &nbsp; (and numeric versions of <>)"
jenkins-bot [Wed, 23 Sep 2015 20:36:53 +0000 (20:36 +0000)]
Merge "Terminate free external link on &nbsp; (and numeric versions of <>)"

8 years agoOOUIHTMLForm: s/else if/elseif/
Kunal Mehta [Wed, 23 Sep 2015 20:29:30 +0000 (13:29 -0700)]
OOUIHTMLForm: s/else if/elseif/

Spotted by phpcs.

Change-Id: I1a0b7a08a17849b270a262063744198d81d36de1

8 years agoMerge "Added support for enqueueable DataUpdates"
jenkins-bot [Wed, 23 Sep 2015 20:26:59 +0000 (20:26 +0000)]
Merge "Added support for enqueueable DataUpdates"

8 years agoMerge "Revert "Do not double load gallery styles now cache has expired""
jenkins-bot [Wed, 23 Sep 2015 20:03:17 +0000 (20:03 +0000)]
Merge "Revert "Do not double load gallery styles now cache has expired""

8 years agoTerminate free external link on &nbsp; (and numeric versions of <>)
C. Scott Ananian [Wed, 23 Sep 2015 19:16:24 +0000 (15:16 -0400)]
Terminate free external link on &nbsp; (and numeric versions of <>)

Bug: T84937
Change-Id: Ic74d8d069e08c0597c7b26755e0d942bf3a510cc

8 years agoMerge "Remove oversight references from i18n"
jenkins-bot [Wed, 23 Sep 2015 19:57:15 +0000 (19:57 +0000)]
Merge "Remove oversight references from i18n"

8 years agoRevert "Do not double load gallery styles now cache has expired"
Ori.livneh [Wed, 23 Sep 2015 19:32:33 +0000 (19:32 +0000)]
Revert "Do not double load gallery styles now cache has expired"

This reverts commit 0fc3b0850c0def14a213dc7f0278444948762f82.

Bug: T113511
Change-Id: I62afd734432c4e7432fe04b146809423090df9fe

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 23 Sep 2015 19:14:28 +0000 (21:14 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I8ae3ae761cc2dd0e418bc584d8b1c0328a1a9dbb

8 years agoAdded support for enqueueable DataUpdates
Aaron Schulz [Tue, 22 Sep 2015 18:43:33 +0000 (11:43 -0700)]
Added support for enqueueable DataUpdates

* Updates can now declare themselves as having enqueueUpdate()
  as an alternative to doUpdate(). This lets more expensive
  or slave lag producing updates use the job queue if desired.
* Added a $mode flag to DataUpdate::runUpdates() to prefer
  pushing jobs over calling doUpdate().
* Made page deletions defer deletion updates when possible.

Bug: T95501
Change-Id: Ic6f50f92768089ba0fbc223b8d178f5a91512959

8 years agoRemove oversight references from i18n
Alex Monk [Tue, 15 Sep 2015 22:52:10 +0000 (23:52 +0100)]
Remove oversight references from i18n

Change-Id: Ie1c81e0e54cf8cb36c83b8e11932ca8917fdd07b

8 years agoFeed.php: Apply wfBCP47 to language code
Fomafix [Fri, 24 Jul 2015 15:24:03 +0000 (15:24 +0000)]
Feed.php: Apply wfBCP47 to language code

Change-Id: Ibaf771f6348bd5c25a39d6e6ae328251191454e2

8 years agoMerge "Compat fix for HHVM on non-Linux OSs"
Ori Livneh [Wed, 23 Sep 2015 18:03:19 +0000 (18:03 +0000)]
Merge "Compat fix for HHVM on non-Linux OSs"

8 years agoMerge "SpecialNewpages: Add redirect=no only to links to redirects"
jenkins-bot [Wed, 23 Sep 2015 17:11:08 +0000 (17:11 +0000)]
Merge "SpecialNewpages: Add redirect=no only to links to redirects"

8 years agoMerge "mediawiki.Upload.Dialog: Factor out booklet layout"
jenkins-bot [Wed, 23 Sep 2015 16:37:19 +0000 (16:37 +0000)]
Merge "mediawiki.Upload.Dialog: Factor out booklet layout"

8 years agoSpecialNewpages: Add redirect=no only to links to redirects
Fomafix [Wed, 23 Sep 2015 16:34:46 +0000 (16:34 +0000)]
SpecialNewpages: Add redirect=no only to links to redirects

Since 2748c4091 all title links have redirect=no. This is requested in T16353.
To satisfy T16353 it should be enough to add this only to links to redirects.

Appending redirect=no to all links has the disadvantage of a duplicate link.

This change adds redirect=no only to links to redirects.

Change-Id: I33da0f1eadc5dfbc46820015622ee1a55acbfe21

8 years agoMerge "CategorySelector: Add different ways of searching"
jenkins-bot [Wed, 23 Sep 2015 16:30:47 +0000 (16:30 +0000)]
Merge "CategorySelector: Add different ways of searching"

8 years agoMerge "Add hook to allow lazy loading of import sources"
jenkins-bot [Wed, 23 Sep 2015 16:30:36 +0000 (16:30 +0000)]
Merge "Add hook to allow lazy loading of import sources"

8 years agoMerge "docs: mediawiki.ForeignStructuredUpload: Fix formatting"
Bartosz Dziewoński [Wed, 23 Sep 2015 15:28:59 +0000 (15:28 +0000)]
Merge "docs: mediawiki.ForeignStructuredUpload: Fix formatting"

8 years agoUploadFromUrl: Display an error to the user on invalid wpUploadFileURL
Rohan [Sun, 15 Jun 2014 17:47:49 +0000 (23:17 +0530)]
UploadFromUrl: Display an error to the user on invalid wpUploadFileURL

Removes check for URL validity from UploadFromUrl::isValidRequest()
so that an error can be thrown later and displayed to the user.

Bug: T34361
Change-Id: Idf4cfcd6199ef6e875f760e46db98248ba53a327

8 years agomediawiki.Upload.Dialog: Factor out booklet layout
Ed Sanders [Mon, 21 Sep 2015 21:08:17 +0000 (22:08 +0100)]
mediawiki.Upload.Dialog: Factor out booklet layout

So that it can be used outside of the upload dialog.

Change-Id: Ic6e7e4499611e64a905f2828bdf0ee538168c9ec

8 years agodocs: mediawiki.ForeignStructuredUpload: Fix formatting
Prateek Saxena [Wed, 23 Sep 2015 12:17:01 +0000 (17:47 +0530)]
docs: mediawiki.ForeignStructuredUpload: Fix formatting

Before - https://phabricator.wikimedia.org/F2627998
After - https://phabricator.wikimedia.org/F2627999

Change-Id: Ib4844f26ee75c9d85840043d06969e0866c85d99

8 years agoCategorySelector: Add different ways of searching
Prateek Saxena [Fri, 11 Sep 2015 09:22:22 +0000 (14:52 +0530)]
CategorySelector: Add different ways of searching

We'll need this for HotCat. We'll be able to set multiple ways of
searching, build an array of promises and collate the results once all
of them have resolved.

Also adds methods to set searchTypes and validates the list.

searchCategories() is too long right now, but can be easily broken down
into multiple routines, not sure if that is helpful though.

This also allows the user to choose categories that don't exist yet.

Bug: T113462
Change-Id: I5a350a2d91b0afb0567f4290654770c74607ce63

8 years agoCompat fix for HHVM on non-Linux OSs
Ori Livneh [Wed, 23 Sep 2015 08:53:47 +0000 (01:53 -0700)]
Compat fix for HHVM on non-Linux OSs

RUSAGE_THREAD is not POSIX; it's Linux-specific. HHVM now compiles on OS X,
and calling getrusage( 2 ) on OS X explodes with:

    exception : f_getrusage is not supported: RUSAGE_THREAD is not defined on
    this sytem [sic]

HHVM is being ported to Windows, too, where RUSAGE_THREAD is likewise missing.
So check that PHP_OS === 'Linux' before using it.

Change-Id: I6eac7d2bb4edfa1e697ae72f89299d0d5ac135f4

8 years agoMerge "Fix hook documentation for PageRenderingHash"
jenkins-bot [Wed, 23 Sep 2015 08:05:33 +0000 (08:05 +0000)]
Merge "Fix hook documentation for PageRenderingHash"

8 years agoMerge "jsduck: Load OOjs and OOjs UI in eg-iframe.html"
jenkins-bot [Wed, 23 Sep 2015 08:00:52 +0000 (08:00 +0000)]
Merge "jsduck: Load OOjs and OOjs UI in eg-iframe.html"

8 years agoMerge "Fix hook documentation for UploadFormSourceDescriptors"
jenkins-bot [Wed, 23 Sep 2015 07:56:34 +0000 (07:56 +0000)]
Merge "Fix hook documentation for UploadFormSourceDescriptors"

8 years agoAdd hook to allow lazy loading of import sources
This, that and the other [Wed, 23 Sep 2015 07:54:31 +0000 (17:54 +1000)]
Add hook to allow lazy loading of import sources

Currently import sources have to be set into $wgImportSources as part of
wiki startup. This is not practical for the WMF cluster, where we need some
reasonably complex logic to set up the import source structure.

This change allows the import source list to be populated from a new
"ImportSources" hook. This hook is only called when the list of import
sources is actually needed (namely, when a user with relevant permissions
loads Special:Import).

Bug: T17583
Change-Id: Ice9a19cb6dfe53ae72aa71353d0553ee9338f233

8 years agoFix hook documentation for PageRenderingHash
umherirrender [Sun, 20 Sep 2015 08:44:15 +0000 (10:44 +0200)]
Fix hook documentation for PageRenderingHash

The last parameter was not in documentation.

Follows Ieecb27216c39b7e6e354b4a1904fbff06506307d

Change-Id: I1eaf0e98a97f804f6b402517e45fcad54ee65ac0

8 years agojsduck: Load OOjs and OOjs UI in eg-iframe.html
Roan Kattouw [Wed, 2 Sep 2015 16:18:50 +0000 (09:18 -0700)]
jsduck: Load OOjs and OOjs UI in eg-iframe.html

This makes live preview work for OOUI classes.

Also:
* Remove duplicate definition of window.onerror (the latter which
  fails to include the 'error' variable in the logged message).
* Set mwPerformance to match startup.js as it was throwing
  a fatal exception on every page.

Bug: T112116
Change-Id: I00e789a2853e82e9a89d07752ce92fa6bb9615f5

8 years agoMerge "Translate password reset e-mail subject into proper language"
jenkins-bot [Wed, 23 Sep 2015 07:40:32 +0000 (07:40 +0000)]
Merge "Translate password reset e-mail subject into proper language"

8 years agoMerge "build: Enable jscs jsDoc rule 'checkRedundantReturns' and make pass"
jenkins-bot [Wed, 23 Sep 2015 07:40:12 +0000 (07:40 +0000)]
Merge "build: Enable jscs jsDoc rule 'checkRedundantReturns' and make pass"

8 years agobuild: Enable jscs jsDoc rule 'checkRedundantReturns' and make pass
James D. Forrester [Sat, 5 Sep 2015 19:15:01 +0000 (12:15 -0700)]
build: Enable jscs jsDoc rule 'checkRedundantReturns' and make pass

Change-Id: I5006ea3df6798201edfacbf8ad4624266554f064

8 years agoAdd my second gerrit e-mail to .mailmap
Florianschmidtwelzow [Tue, 22 Sep 2015 08:20:06 +0000 (10:20 +0200)]
Add my second gerrit e-mail to .mailmap

Change-Id: I6f57e871a54ae73a375023e6ab033c74dd67c8fc

8 years agoMerge "Update mailmap from USERINFO"
jenkins-bot [Wed, 23 Sep 2015 07:06:28 +0000 (07:06 +0000)]
Merge "Update mailmap from USERINFO"

8 years agoMerge "objectcache: Fix some doc bullet points in WANObjectCache"
jenkins-bot [Wed, 23 Sep 2015 05:28:18 +0000 (05:28 +0000)]
Merge "objectcache: Fix some doc bullet points in WANObjectCache"

8 years agoMerge "objectcache: Add comments about DB isolation to WANObjectCache"
jenkins-bot [Wed, 23 Sep 2015 05:26:27 +0000 (05:26 +0000)]
Merge "objectcache: Add comments about DB isolation to WANObjectCache"

8 years agoobjectcache: Fix some doc bullet points in WANObjectCache
Aaron Schulz [Tue, 22 Sep 2015 20:37:19 +0000 (13:37 -0700)]
objectcache: Fix some doc bullet points in WANObjectCache

Change-Id: Id3e65b0768d45087aaf83ed3f432923c82acc713

8 years agoobjectcache: Add comments about DB isolation to WANObjectCache
Aaron Schulz [Tue, 22 Sep 2015 19:54:24 +0000 (12:54 -0700)]
objectcache: Add comments about DB isolation to WANObjectCache

Change-Id: Ic3454d0ebfdb05488dd650f77e09264842caea1c

8 years agoMerge "Update OOjs UI to v0.12.9"
jenkins-bot [Tue, 22 Sep 2015 21:52:52 +0000 (21:52 +0000)]
Merge "Update OOjs UI to v0.12.9"

8 years agomw.storage: Fix broken test (incompatible with Chrome 45)
Timo Tijhof [Tue, 22 Sep 2015 20:44:52 +0000 (21:44 +0100)]
mw.storage: Fix broken test (incompatible with Chrome 45)

The localStorage global is read-only which Chrome 45 enforces.

Simplify things by dropping mediaWiki.storage.isStorageEnabled, and
by wrapping each operation with a try / catch.

Bug: T113413
Change-Id: Iecbdeb050b9a69febd3388898d98293a84588a94

8 years agoUpdate OOjs UI to v0.12.9
James D. Forrester [Tue, 22 Sep 2015 20:14:56 +0000 (21:14 +0100)]
Update OOjs UI to v0.12.9

Release notes:
 https://git.wikimedia.org/blob/oojs%2Fui.git/v0.12.9/History.md

Change-Id: I8780a6d31a3c9d11e42f0858bb66a39f678bf28f

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 22 Sep 2015 19:50:09 +0000 (21:50 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I22fc6e0c1af4d2db3c1a7e053a1597764dce8339

8 years agoMark UserRights hook as deprecated
Kunal Mehta [Tue, 22 Sep 2015 18:29:34 +0000 (11:29 -0700)]
Mark UserRights hook as deprecated

Bug: T113358
Change-Id: I0b4a319f703c549da42d579063e1eadb2260fa21

8 years agoMerge "Moved LinksDeletionUpdate to a separate file"
jenkins-bot [Tue, 22 Sep 2015 18:24:35 +0000 (18:24 +0000)]
Merge "Moved LinksDeletionUpdate to a separate file"

8 years agoMerge "Add the performer to the UserRightsChanged hook"
jenkins-bot [Tue, 22 Sep 2015 18:15:25 +0000 (18:15 +0000)]
Merge "Add the performer to the UserRightsChanged hook"

8 years agoMoved LinksDeletionUpdate to a separate file
Aaron Schulz [Tue, 22 Sep 2015 18:07:47 +0000 (11:07 -0700)]
Moved LinksDeletionUpdate to a separate file

* Also removed unused updateCategoryCounts() method

Change-Id: I25f64d3771a23d18e7993433dab449adec375d9b

8 years agoMerge "mediawiki.Upload: Return same data for upload & stashed upload"
jenkins-bot [Tue, 22 Sep 2015 18:05:57 +0000 (18:05 +0000)]
Merge "mediawiki.Upload: Return same data for upload & stashed upload"

8 years agoAdd the performer to the UserRightsChanged hook
Kunal Mehta [Tue, 22 Sep 2015 17:58:20 +0000 (10:58 -0700)]
Add the performer to the UserRightsChanged hook

This allows extensions (e.g. Echo) to detect who made the change without
relying upon $wgUser. It also allows for differentiation between
autopromotion entries which will pass in `false` as the performer.

Change-Id: Idebd78b54dcea1bdc84c83f402e87b240ab4ade1

8 years agomediawiki.Upload: Return same data for upload & stashed upload
Ed Sanders [Tue, 22 Sep 2015 15:18:55 +0000 (16:18 +0100)]
mediawiki.Upload: Return same data for upload & stashed upload

The stashed upload was omitting the imageinfo and raw result in the promise.

Change-Id: I79462c1121c879d90eed3d245948335cd08bba30

8 years agoMerge "Set visibility of monolog tests setUp method to protected"
jenkins-bot [Tue, 22 Sep 2015 16:58:58 +0000 (16:58 +0000)]
Merge "Set visibility of monolog tests setUp method to protected"

8 years agoMerge "Also check Kafka class exists in KafkaHandlerTest"
jenkins-bot [Tue, 22 Sep 2015 16:49:06 +0000 (16:49 +0000)]
Merge "Also check Kafka class exists in KafkaHandlerTest"

8 years agoSet visibility of monolog tests setUp method to protected
aude [Tue, 22 Sep 2015 14:57:55 +0000 (16:57 +0200)]
Set visibility of monolog tests setUp method to protected

In phpunit and MediaWikiTestCase, the setUp method is protected,
and it's nice if the subclasses are consistent.

Change-Id: I4b8ac612951168913bb2dc9cf16d3dc18762a211

8 years agoAlso check Kafka class exists in KafkaHandlerTest
aude [Tue, 22 Sep 2015 14:54:58 +0000 (16:54 +0200)]
Also check Kafka class exists in KafkaHandlerTest

I have monolog installed but not Kafka, so still
the test was run and broken for me.

Change-Id: If396815d77b0ae25fbd5c16b628f217478062b43

8 years agoMerge "Fixes for RedisBagOStuff when using twemproxy"
jenkins-bot [Tue, 22 Sep 2015 14:48:08 +0000 (14:48 +0000)]
Merge "Fixes for RedisBagOStuff when using twemproxy"

8 years agoMerge "Fix typo in KafkaHandlerTest"
jenkins-bot [Tue, 22 Sep 2015 14:45:31 +0000 (14:45 +0000)]
Merge "Fix typo in KafkaHandlerTest"

8 years agoMerge "Fix missing dependencies needed for tests."
jenkins-bot [Tue, 22 Sep 2015 14:44:03 +0000 (14:44 +0000)]
Merge "Fix missing dependencies needed for tests."

8 years agoFix typo in KafkaHandlerTest
aude [Tue, 22 Sep 2015 14:35:36 +0000 (16:35 +0200)]
Fix typo in KafkaHandlerTest

Change-Id: Ib73152a269e01bc64a4b1e7a9157de2088d152d2

8 years agoFix missing dependencies needed for tests.
Jan Zerebecki [Tue, 22 Sep 2015 10:27:29 +0000 (12:27 +0200)]
Fix missing dependencies needed for tests.

Added to require-dev: wikimedia/avro, nmred/kafka-php,
monolog/monolog. These were added to vendor, but are
only suggested in core.

Change-Id: Ic760077df11bfac461ad85c5d6d395bed55d6c92

8 years agoFollow-up 5cd0a43e5: Add SelectFileWidget's i18n to ResourcesOOUI
James D. Forrester [Tue, 22 Sep 2015 11:36:49 +0000 (12:36 +0100)]
Follow-up 5cd0a43e5: Add SelectFileWidget's i18n to ResourcesOOUI

Change-Id: Ibd8ff7e66ac48bdfb24a3d2a2673e1586c4bb5dc

8 years agoMerge "Use CSS columns instead of tables in Special:SpecialPages (2)"
jenkins-bot [Tue, 22 Sep 2015 09:10:00 +0000 (09:10 +0000)]
Merge "Use CSS columns instead of tables in Special:SpecialPages (2)"

8 years agoFix typo in AvroFormatterTest
Adrian Heine [Tue, 22 Sep 2015 08:07:09 +0000 (10:07 +0200)]
Fix typo in AvroFormatterTest

Also removes trailing whitespace in that file.

Change-Id: Icf30a68ea7356735f416baae8a435e0f10d5caaa

8 years agoMerge "jquery.byteLimit: Trigger 'change' event after limitting"
jenkins-bot [Tue, 22 Sep 2015 07:42:04 +0000 (07:42 +0000)]
Merge "jquery.byteLimit: Trigger 'change' event after limitting"

8 years agoMerge "Add new authentication-related hooks (and remove one) replacing some AuthPlugi...
jenkins-bot [Tue, 22 Sep 2015 07:32:03 +0000 (07:32 +0000)]
Merge "Add new authentication-related hooks (and remove one) replacing some AuthPlugin methods"

8 years agoMerge "Set getFeatures() for MemoryFileBackend"
jenkins-bot [Tue, 22 Sep 2015 07:20:22 +0000 (07:20 +0000)]
Merge "Set getFeatures() for MemoryFileBackend"

8 years agoMerge "Update UploadWizard-specific messages"
jenkins-bot [Tue, 22 Sep 2015 07:16:16 +0000 (07:16 +0000)]
Merge "Update UploadWizard-specific messages"

8 years agoMerge "By default have Main page text on Main page tab"
jenkins-bot [Tue, 22 Sep 2015 07:03:59 +0000 (07:03 +0000)]
Merge "By default have Main page text on Main page tab"

8 years agoBy default have Main page text on Main page tab
paladox [Sun, 20 Sep 2015 18:20:31 +0000 (19:20 +0100)]
By default have Main page text on Main page tab

Bug: T111645
Change-Id: I8e3ca7e6b636466c145d90bd22a2d9098708af73

8 years agoMerge "registration: Allow extensions to specify which MW core versions they require"
jenkins-bot [Tue, 22 Sep 2015 04:57:47 +0000 (04:57 +0000)]
Merge "registration: Allow extensions to specify which MW core versions they require"

8 years agojobqueue: A few small code cleanups to RefreshLinksJob
Aaron Schulz [Tue, 22 Sep 2015 01:17:36 +0000 (18:17 -0700)]
jobqueue: A few small code cleanups to RefreshLinksJob

Change-Id: Ia331e9dbf9d2be137c34a8c93ef2d6da8aad6c56

8 years agoMerge "Removed DeferredUpdates::addHTMLCacheUpdate()"
jenkins-bot [Tue, 22 Sep 2015 01:21:37 +0000 (01:21 +0000)]
Merge "Removed DeferredUpdates::addHTMLCacheUpdate()"

8 years agoRemoved DeferredUpdates::addHTMLCacheUpdate()
Aaron Schulz [Mon, 21 Sep 2015 23:22:37 +0000 (16:22 -0700)]
Removed DeferredUpdates::addHTMLCacheUpdate()

* That method does not belong in DeferredUpdates
  as this class should agnostic to the work done

Change-Id: I8098ffb82bf9c33ccb48a31aa9dbad514e8724a8

8 years agoMerge "Reduced the DOS potential of 404 page floods"
jenkins-bot [Tue, 22 Sep 2015 00:58:54 +0000 (00:58 +0000)]
Merge "Reduced the DOS potential of 404 page floods"

8 years agoMerge "Removed deprecated $wgDeferredUpdateList"
jenkins-bot [Tue, 22 Sep 2015 00:50:22 +0000 (00:50 +0000)]
Merge "Removed deprecated $wgDeferredUpdateList"

8 years agoReduced the DOS potential of 404 page floods
Aaron Schulz [Fri, 18 Sep 2015 05:37:16 +0000 (22:37 -0700)]
Reduced the DOS potential of 404 page floods

* showMissingArticle() will now only show the log excerpt
  if the page was deleted very recently or if the viewing
  user is logged in. Crawlers and poorly written bots tend
  to be logged out, and logged in users are better tracked.
  If many hits to the same recently deleted page are made,
  then the innoDB buffer pool should actually have the
  relevant index pages in cache (especially with query grouping).
* There have been several outages or DB performance problems
  caused by crawlers or sloppy mirrors hitting many bogus pages
  (due to bad URL generation, ect...). Previously a redis bloom
  filter was used to handle this, but was removed due to high
  complexity (especially if it was to be supported in multi-DC
  setup). This is a simpler solution to keep 404 pages cheap,
  as they cannot really be cached (there are innumerable possible
  titles that never existed).

Change-Id: If948602a32deb16dba21d232d0c6128568a980d6

8 years agoRemoved deprecated $wgDeferredUpdateList
Aaron Schulz [Mon, 21 Sep 2015 23:25:47 +0000 (16:25 -0700)]
Removed deprecated $wgDeferredUpdateList

Change-Id: I7072ad3b34dd9a0726df6d1c044616c3b4bcd79f

8 years agoMerge "Produce monolog messages through kafka+avro"
jenkins-bot [Mon, 21 Sep 2015 23:26:05 +0000 (23:26 +0000)]
Merge "Produce monolog messages through kafka+avro"

8 years agoSet getFeatures() for MemoryFileBackend
Aaron Schulz [Mon, 21 Sep 2015 22:04:12 +0000 (15:04 -0700)]
Set getFeatures() for MemoryFileBackend

Change-Id: I565e2e2c8a4a89c6706349a4ef9826f87445d1d2

8 years agoMerge "Added read affinity tests for FileBackendMultiWrite"
jenkins-bot [Mon, 21 Sep 2015 21:30:45 +0000 (21:30 +0000)]
Merge "Added read affinity tests for FileBackendMultiWrite"

8 years agoProduce monolog messages through kafka+avro
Erik Bernhardson [Tue, 4 Aug 2015 18:02:47 +0000 (11:02 -0700)]
Produce monolog messages through kafka+avro

This allows a logging channel to be configured to write
directly to kafka. Logs can be serialized either to json
blobs or the more compact apache avro format.

The Kafka handler for monolog needs a list of one of more
kafka servers to query cluster metadata from. This should be
able to use any monolog formatter, although some like
JsonFormatter require you to disable formatBatch as Kafka
protocol would prefer to encode each record independently in
the protocol.  This requires the nmred/kafka-php library,
version >= 1.3.0.

Adds a new formatter which serializes to the apache avro
format. This is a compact binary format which uses pre-
defined schemas. This initial implementation is very simple
and takes the plain schemas as a constructor argument.

Adds a new option to MonologSpi to wrap handlers in a
BufferHandler. This doesn't flush until the request shuts
down and prevents any network requests in the logger from
adding latency to web requests.

Related mediawiki/vendor update: Ibfe4bd2036ae8e998e2973f07bd9a6f057691578

The necessary config is something like:

array(
    'loggers' => array(
        'CirrusSearchRequests' => array(
            'handlers' => array( 'kafka' ),
        ),
    ),
    'handlers' => array(
        'kafka' => array(
            'factory' => '\\MediaWiki\\Logger\\Monolog\\KafkaHandler::factory',
            'args' => array( 'localhost:9092' ),
            'formatter' => 'avro',
            'buffer' => true,
        ),
    ),
    'formatters' => array(
        'avro' => array(
            'class' => '\\MediaWiki\\Logger\\Monolog\\AvroFormatter',
            'args' => array(
                array(
                    'CirrusSearchRequests' => array(
                        'type' => 'record',
                        'name' => 'CirrusSearchRequests'
                        'fields' => array( ... )
                    ),
                ),
            ),
        ),
    ),
)

Bug: T106256
Change-Id: I6ee744b3e5306af0bed70811b558a543eed22840

8 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 21 Sep 2015 19:42:14 +0000 (21:42 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I63f5687fe78418403fdb3de398ece449efd3c72a

8 years agoMerge "Refactor changeTypes in RecentChange"
jenkins-bot [Mon, 21 Sep 2015 19:16:19 +0000 (19:16 +0000)]
Merge "Refactor changeTypes in RecentChange"

8 years agoMerge "Add tests for RecentChange::parse(To|From)RCType"
jenkins-bot [Mon, 21 Sep 2015 19:16:15 +0000 (19:16 +0000)]
Merge "Add tests for RecentChange::parse(To|From)RCType"

8 years agoMerge "Cleaned up $asyncWrites member variable in MultiWriteBagOStuff"
Aaron Schulz [Mon, 21 Sep 2015 18:55:15 +0000 (18:55 +0000)]
Merge "Cleaned up $asyncWrites member variable in MultiWriteBagOStuff"

8 years agoCleaned up $asyncWrites member variable in MultiWriteBagOStuff
Aaron Schulz [Mon, 21 Sep 2015 18:41:44 +0000 (11:41 -0700)]
Cleaned up $asyncWrites member variable in MultiWriteBagOStuff

Change-Id: I27e48aef77ac0f6453b7837f2b2686b7b5b726d4

8 years agoMultiWriteBagOStuff: require nonempty 'caches' param
Ori Livneh [Mon, 21 Sep 2015 18:29:50 +0000 (11:29 -0700)]
MultiWriteBagOStuff: require nonempty 'caches' param

MultiWriteBagOStuff::__construct() barfs if the 'caches' parameter is unset,
but it permits it to be an empty array. This means that subsequent operations
that need to reference the first (primary) cache backend need to check that
it is there at all.

Since there is not much sense in having a MultiWriteBagOStuff object with zero
cache backends, make the constructor require a nonempty array for 'caches', and
remove the subsequent checks that are made redundant by this new restriction.

Change-Id: I30f3e0dcbfe67570a368e64b8233cc0ba7f90b2f

8 years agoAdded read affinity tests for FileBackendMultiWrite
Aaron Schulz [Mon, 21 Sep 2015 18:21:00 +0000 (11:21 -0700)]
Added read affinity tests for FileBackendMultiWrite

Change-Id: I1407273175396d4d3631531ff0ca0afa3009913e

8 years agoMerge "Add i18n messages for ApiStashEdit"
jenkins-bot [Mon, 21 Sep 2015 17:47:27 +0000 (17:47 +0000)]
Merge "Add i18n messages for ApiStashEdit"

8 years agoregistration: Allow extensions to specify which MW core versions they require
Kunal Mehta [Thu, 14 May 2015 05:51:55 +0000 (22:51 -0700)]
registration: Allow extensions to specify which MW core versions they require

This adds a "requires" property to extension.json, which extensions and
skins can use to indicate which versions of MediaWiki core they support.
The hacky wfUseMW() is now deprecated in favor of this.

Rather than writing our own version constraint and parser library, we
can re-use composer's, which was recently split out into a separate
library named "composer/semver" for this patch.

Any syntax accepted by composer[1] is available for usage here. Test
cases have been provided to demonstrate how versions are parsed. For now
it is recommended that people stick to expressing compatability with
stable versions (e.g. ">= 1.26").

This patch does not support requiring specific MediaWiki core WMF
branches, since those do not follow the standard semver format that
composer parses. If we are unable to parse $wgVersion, all checking will
be skipped and reported as compatible.

[1] https://getcomposer.org/doc/01-basic-usage.md#package-versions

Bug: T99084
Change-Id: I7785827216e16c596356d0ae42d6b30f3f179f10

8 years agoRefactor changeTypes in RecentChange
addshore [Thu, 17 Sep 2015 09:56:22 +0000 (10:56 +0100)]
Refactor changeTypes in RecentChange

This is split from:
I03516bb34144d95e5f25c46ae98ab70ce699b31b

Change-Id: I285cdbe3d1a62aa1071a5c174928136c3f59d557

8 years agoUpdate mailmap from USERINFO
Antoine Musso [Fri, 18 Sep 2015 10:47:26 +0000 (12:47 +0200)]
Update mailmap from USERINFO

Create mailmap rules for any @users.mediawiki.org email that has a
matching entry under USERINFO.

The script used is proposed in mediawiki/tools/release.git
https://gerrit.wikimedia.org/r/239343

Manually added a lot more by digging in Gerrit commit Authors: fields
since that is publicly available as well.

Change-Id: I517b0593f9861d68aad3d93f2556a9cf135e28d8

8 years agoAdd i18n messages for ApiStashEdit
Brad Jorsch [Mon, 21 Sep 2015 14:31:01 +0000 (10:31 -0400)]
Add i18n messages for ApiStashEdit

Bug: T113189
Change-Id: Iee7b2fbb7b9cd4e7255c87d78be9396073f41236

8 years agoAdd tests for RecentChange::parse(To|From)RCType
addshore [Mon, 21 Sep 2015 13:58:56 +0000 (14:58 +0100)]
Add tests for RecentChange::parse(To|From)RCType

Change-Id: I60278aaeef475ed3ec1515b1f5f28d6afcc700c5

8 years agoAdd test for RecentChange::newFromRow
addshore [Mon, 21 Sep 2015 13:51:44 +0000 (14:51 +0100)]
Add test for RecentChange::newFromRow

Change-Id: I1e21d296e15c1b6d18f19ae9cc7038387c8f4e2b

8 years agoAdd test for RecentChange::isInRCLifespan
addshore [Mon, 21 Sep 2015 09:34:13 +0000 (10:34 +0100)]
Add test for RecentChange::isInRCLifespan

Change-Id: I0eac57d0cfabba3ed9b5b430e9972e7c5c0b9f8b

8 years agoMerge "Use setUp instead of __construct in RecentChangeTest"
jenkins-bot [Mon, 21 Sep 2015 14:15:30 +0000 (14:15 +0000)]
Merge "Use setUp instead of __construct in RecentChangeTest"

8 years agoMerge "Cleanup RecentChangeTest, move things out that don't belong"
jenkins-bot [Mon, 21 Sep 2015 14:15:26 +0000 (14:15 +0000)]
Merge "Cleanup RecentChangeTest, move things out that don't belong"

8 years agoUse setUp instead of __construct in RecentChangeTest
addshore [Mon, 21 Sep 2015 09:25:24 +0000 (10:25 +0100)]
Use setUp instead of __construct in RecentChangeTest

Change-Id: Ia0d704a2832c54995fba0014ae6422765a743be0

8 years agoCleanup RecentChangeTest, move things out that don't belong
addshore [Mon, 21 Sep 2015 08:50:04 +0000 (09:50 +0100)]
Cleanup RecentChangeTest, move things out that don't belong

This moves out a bunch of stuff that doesnt
seem to test anything in RecentChange....

This also shows us how few tests RecentChange
actually has!

Change-Id: Ia5016c82c00dd7c35a6f1253d6e385b587ec485e

8 years agoTranslate password reset e-mail subject into proper language
Mormegil [Mon, 21 Sep 2015 12:58:37 +0000 (14:58 +0200)]
Translate password reset e-mail subject into proper language

The password reset e-mail should have the subject line localized into
the same language as the body, which is the preferred UI language
set by the user, not the content language of the wiki.

Bug: T113227
Change-Id: I3bb1e1035004a329b934afb2fbfbd407685c6e8c