Commit graph

2282 commits

Author SHA1 Message Date
James D. Forrester 1b04af5aca build: Enable phpcs rule 'PSR2.Classes.PropertyDeclaration.VarUsed' and make pass
Change-Id: I74a33b511363c0b8ae81a0a5b6b6c9c32f0df09d
2015-10-29 13:06:43 +01:00
James D. Forrester eb4e17f15d build: Enable phpcs rule 'PSR2.Classes.PropertyDeclaration.ScopeMissing' and make pass
Change-Id: I96b295bba43185085631722e10a5e5cfa7ecf27f
2015-10-29 13:06:43 +01:00
James D. Forrester 7f7e6b8159 build: Enable phpcs rule 'PSR2.Methods.MethodDeclaration.StaticBeforeVisibility' and make pass
Change-Id: Iff0709c3a30f8c39d54bab2361e109c96aea6aa0
2015-10-29 13:06:43 +01:00
James D. Forrester 42e2764494 build: Enable phpcs rule 'PSR2.Methods.MethodDeclaration.AbstractAfterVisibility' and make pass
Change-Id: I316d30e5474646cfc7a8a03b540c09741cd7fdc6
2015-10-29 13:06:43 +01:00
James D. Forrester cd8c77df29 build: Enable phpcs rule 'MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment' and make pass
Change-Id: Ied1a479e6f5aa82d03e449ec10d655a921cd37e4
2015-10-29 13:06:14 +01:00
James D. Forrester 852ddaf903 build: Enable phpcs rule 'MediaWiki.Usage.DirUsage.FunctionFound' and make pass
Change-Id: I05c9299944a5a8e215ecb2996f1a3846e257e12c
2015-10-29 12:57:40 +01:00
James D. Forrester 1ee78723d9 build: Enable phpcs rule 'Generic.PHP.ForbiddenFunctions.FoundWithAlternative' and make pass
Change-Id: Ib883696662745641ee8b59ddb4fe478a44c46a02
2015-10-29 12:57:15 +01:00
James D. Forrester 18969bf227 build: Enable phpcs rule 'Generic.Functions.FunctionCallArgumentSpacing.SpaceBeforeComma' and make pass
Change-Id: I5493cb692525ab6c0d560aebbe131f40b6016232
2015-10-29 12:57:02 +01:00
James D. Forrester becbea0941 build: Enable phpcs rule 'Squiz.WhiteSpace.LanguageConstructSpacing.Incorrect' and make pass
Change-Id: I9379c18263474ed13921791b920c7b06e58a84ad
2015-10-29 12:56:33 +01:00
Kunal Mehta cb82edfe94 Run phpcs through "composer test", disabling failing rules
Disabling:
* Generic.Files.LineLength
* Generic.Functions.FunctionCallArgumentSpacing.SpaceBeforeComma
* Generic.PHP.ForbiddenFunctions.FoundWithAlternative
* MediaWiki.NamingConventions.PrefixedGlobalFunctions.wfPrefix
* MediaWiki.Usage.DirUsage.FunctionFound
* MediaWiki.VariableAnalysis.UnusedGlobalVariables
* MediaWiki.WhiteSpace.SpaceAfterControlStructure.Incorrect
* MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment
* PSR2.Classes.PropertyDeclaration.ScopeMissing
* PSR2.Classes.PropertyDeclaration.VarUsed
* PSR2.Methods.MethodDeclaration.AbstractAfterVisibility
* PSR2.Methods.MethodDeclaration.StaticBeforeVisibility
* Squiz.Classes.ValidClassName.NotCamelCaps
* Squiz.WhiteSpace.LanguageConstructSpacing.Incorrect

Disabled rules will be enabled individually in follow-up patches.

Bug: T101074
Change-Id: I1d52d891eb8e4f5877d1f1f3fa3aa9fc28dff004
2015-10-29 12:52:32 +01:00
jenkins-bot e174fdf91b Merge "API: Remove no-op wfProfile(In|Out) calls" 2015-10-29 01:49:06 +00:00
jenkins-bot 68b5982dbf Merge "Allow presentation models to indicate a notification can't be formatted" 2015-10-29 01:48:54 +00:00
Kunal Mehta 46d0e7d0fd API: Remove no-op wfProfile(In|Out) calls
Change-Id: If64abbfb5bc22556ca376311cba8a5d460d8a668
2015-10-28 18:28:22 -07:00
Kunal Mehta ba957d399a Allow presentation models to indicate a notification can't be formatted
Adds EchoEventPresentationModel::canRender() for notification types to
indicate that something can't be rendered if for example, a page is
deleted.

In that case, the notification is marked as read in a deferred update.
All callers were also updated to check if the notification was formatted
properly.

Bug: T116888
Change-Id: Idb975feaec893ef86c41cc487102e3539c07e328
2015-10-28 18:28:08 -07:00
Translation updater bot 3e85eac3f9 Localisation updates from https://translatewiki.net.
Change-Id: Ie69608ad36ba70247617787b5e13d6d51a36dae7
2015-10-28 21:53:45 +01:00
jenkins-bot e27952165f Merge "Comment out presentation model for mentions since it fatals on deleted pages" 2015-10-28 06:51:52 +00:00
Roan Kattouw 0feccf98f8 Comment out presentation model for mentions since it fatals on deleted pages
Bug: T116888
Change-Id: I93361fb0fc809e9fd4173710d86d824c0a6adefe
2015-10-27 23:44:57 -07:00
jenkins-bot 412a7f9145 Merge "Fix page-linked notifications" 2015-10-28 01:37:53 +00:00
Kunal Mehta 20be6beb7c Fix page-linked notifications
This hook is now executed through the job queue, so $wgUser will not
accurately be set.

This depends upon I083736a174b6 in MediaWiki core to actually work.

Bug: T116485
Change-Id: I176fec492d136b097ada79a308e6822832705472
2015-10-27 16:17:25 -07:00
Translation updater bot 3af620871e Localisation updates from https://translatewiki.net.
Change-Id: Ia47ccd3df69c8fb08e142e1b6de510c9d3a23719
2015-10-27 21:31:59 +01:00
Translation updater bot f09140a9ad Localisation updates from https://translatewiki.net.
Change-Id: I73005ab74fa9c0e521aca7d04d450466d756bf6f
2015-10-26 21:02:51 +01:00
jenkins-bot af48842013 Merge "API: Remove pre-1.25 compat code" 2015-10-26 17:53:24 +00:00
jenkins-bot c0c4e20a2c Merge "ApiEchoNotifications: Remove unused variable" 2015-10-26 17:53:21 +00:00
jenkins-bot 8c8ba6e49f Merge "Don't use $wgLang in DataOutputFormatter" 2015-10-26 17:50:50 +00:00
jenkins-bot c9448290c5 Merge "Require $user parameter in DataOutputFormatter::formatOutput()" 2015-10-26 17:47:19 +00:00
Kunal Mehta 1a72434c62 API: Remove pre-1.25 compat code
We already require at least 1.26.

Change-Id: I09ca09fd06fdbf0b367f8a454898c6b7992be42d
2015-10-26 08:41:57 -07:00
Kunal Mehta c8329a728e ApiEchoNotifications: Remove unused variable
Change-Id: I4fe3b7b162c552d8db0ac5bba8b431339cdd137f
2015-10-26 08:39:34 -07:00
Kunal Mehta 1f366807d6 Don't use $wgLang in DataOutputFormatter
Require callers to pass it in.

Change-Id: I94ec940495a681151b289294186121462d4b5b5c
2015-10-26 08:37:57 -07:00
Kunal Mehta f40ef7019f Require $user parameter in DataOutputFormatter::formatOutput()
All callers already pass it.

Change-Id: Ic99893f53d6379a3fbbc2a45193e6804264ff7b7
2015-10-26 08:34:51 -07:00
Translation updater bot 7083c0ebfa Localisation updates from https://translatewiki.net.
Change-Id: I35b9f14b1f756c280eaab50e241a09b558789d9f
2015-10-25 22:03:52 +01:00
jenkins-bot 0beefa78c3 Merge "Clean up and refactor formatting system" 2015-10-23 23:20:00 +00:00
Stephane Bisson ba2d072255 Browser tests: using mw_selenium 1.5 because 1.6 is broken
mw_selenium errors out with undefined method `last_session_ids='
when run in jenkins.

Bug: T114368
Change-Id: Ie4d1b15be3b12694d9adba8747f1457f43ead57c
2015-10-23 11:53:34 -04:00
Translation updater bot c8054b2bcb Localisation updates from https://translatewiki.net.
Change-Id: I38f6cdd32ee2a2757c4bf96a4134f791029a953a
2015-10-22 21:59:45 +02:00
Kunal Mehta 7f6f6536ed EventLogging: Make sure eventId is an integer
Bug: T116205
Change-Id: Ifb9119cbd24b58f24a0eaa0a17a1345220374a4a
2015-10-21 11:08:50 -07:00
Translation updater bot 4bb180103b Localisation updates from https://translatewiki.net.
Change-Id: I10382d49cd182b0aee3722a77f0a0911ed43a5f2
2015-10-20 22:46:41 +02:00
Translation updater bot 31110911ea Localisation updates from https://translatewiki.net.
Change-Id: Ie889ecee7bd344d34dfb6485e3f709d5deaa3e35
2015-10-19 22:15:20 +02:00
Kunal Mehta 56c4b95087 Clean up and refactor formatting system
The workflow to format a notification is
* Get EchoEvent, User, and Language
* Get EchoEventFormatter implementation for notification type
** EchoEventFormatter returns structured data about each part of the
notification (header, body, primary link, secondary link(s))
* Each output type will have a formatter class (e.g.
EchoSpecialNotificationsFormatter, EchoPlainTextEmailFormatter) which
takes a EchoEventPresentationModel and generates whatever it wants
(HTML, plain-text email, etc).

Included is an example conversion of the user-rights and mention
formatters. The previous infrastructure will remain in place for
backwards compatability until other extensions can be updated.

Bug: T107823
Change-Id: I4397872a7ec062148dfcb066ddd8ab83f40486ac
2015-10-19 10:00:23 -07:00
Translation updater bot 7a7f0495ff Localisation updates from https://translatewiki.net.
Change-Id: Icd7f653507a8b52d044ff101a1cabffd1cc82dfa
2015-10-18 21:54:33 +02:00
Kunal Mehta 8cfb10766b SECURITY: Handle suppressed usernames in non-revision based events
We only track revisions for some notification types, others still
reference usernames, but don't check for suppression status. If no
revision is available, use User::isHidden() to check whether
EchoEvent::getAgent() has been hidden.

Bug: T110553
Change-Id: I31e635e365bbb0f6c6ac63be2bdb07e5e2d67c96
2015-10-16 14:56:43 -07:00
Translation updater bot 28348f2f9c Localisation updates from https://translatewiki.net.
Change-Id: I7d131c25b9fcb1aa6665aeed9e58565ab6b33e94
2015-10-15 21:31:33 +02:00
Translation updater bot 2667e50538 Localisation updates from https://translatewiki.net.
Change-Id: I72d88c3955e9e55e95d4a02ba3df728f4220df24
2015-10-15 09:41:27 +02:00
Translation updater bot 164dd2a886 Localisation updates from https://translatewiki.net.
Change-Id: I37689ce4a5b10397e777847ae983bd6eae5f6c5f
2015-10-14 21:51:55 +02:00
Translation updater bot 1000402461 Localisation updates from https://translatewiki.net.
Change-Id: Ibefb3d256666cc778eaca6394f9ea909efa077e3
2015-10-13 22:10:28 +02:00
jenkins-bot 14a5bc371d Merge "Add browser test for notifications in Echo" 2015-10-13 17:29:02 +00:00
Paladox 3dbe5bb0ec Add composer.json
This add php parallel lint test. Can be triggered using the entry
point:

 composer test

That ease Jenkins integration and let developers add more testing
utilities as needed.

Change-Id: I2bf0dbea9f559267001eb727c7ecfeb103717464
2015-10-13 09:48:03 +00:00
jenkins-bot 49ec566a10 Merge "Support UserMerge into anonymous user" 2015-10-12 20:26:44 +00:00
Translation updater bot 66605c8696 Localisation updates from https://translatewiki.net.
Change-Id: I4f03b22a4074893c260dc2766860ddc14852223b
2015-10-12 21:04:03 +02:00
Edward Chernenko 5189fc0ff2 Support UserMerge into anonymous user
When UserMerge is used to merge an account into anonymous user,
we shouldn't attempt to operate on MWEchoNotifUser for $newUser,
as it would cause an exception.

Change-Id: I726e6115d2c30e1579dae55e57cc800aa61d9d7c
2015-10-12 18:34:01 +03:00
Translation updater bot 49a2a325e8 Localisation updates from https://translatewiki.net.
Change-Id: Ifa9acd68330ca07d40ed19bbacdb000a33515237
2015-10-11 21:22:39 +02:00
Kunal Mehta f0b5b64328 build: Updating development dependencies
* grunt-banana-checker: 0.2.2 → 0.4.0

Change-Id: I7e0eed45794f9188e8d537c60ac8fa04af6bf1f0
2015-10-11 11:43:43 -04:00