Kunal Mehta
38e54e14fb
Allow notifications to not have a primary link
...
Because 'welcome' doesn't.
Returning `false` indicates that there is no link, and the
FlyoutFormatter was updated accordingly.
Change-Id: Ifd329b396f3361fc7c08c607a6407181ffdb8bf6
2015-11-02 15:55:17 -08:00
Translation updater bot
2b10ece420
Localisation updates from https://translatewiki.net .
...
Change-Id: I6052db71b0fe307cce8997214e5c8e0c1ed8a48d
2015-11-02 22:36:28 +01:00
Aaron Schulz
e261aa7593
Make EchoEvent::create() a no-op if the DB is read-only
...
This seems better for availability than stopping the world
and rolling everything back (or just throwing post-commit
errors that didn't stop the original change anyway).
Change-Id: I816b3cb5f0d26de608e620a01571a332aa832c05
2015-11-02 11:17:05 -08:00
Translation updater bot
f60eff1e66
Localisation updates from https://translatewiki.net .
...
Change-Id: Iaee36a109993e5aeaa567071f424bf03408859c3
2015-11-01 21:39:39 +01:00
Translation updater bot
357a8dd40f
Localisation updates from https://translatewiki.net .
...
Change-Id: I5a92fce5d3d72d3311329652a35d3c5134928eed
2015-10-31 21:05:33 +01:00
jenkins-bot
a306a2dcab
Merge "IDatabase::delete() does not take a fourth parameter"
2015-10-31 02:21:25 +00:00
Translation updater bot
cf0d71ff7f
Localisation updates from https://translatewiki.net .
...
Change-Id: I4a2a46f090acee50747be19b78cc152a6e078b7a
2015-10-30 21:47:59 +01:00
Kunal Mehta
558cc64bc2
IDatabase::delete() does not take a fourth parameter
...
And don't use the deprecated getDB() function.
Change-Id: I824fb1e69262298d6b76fb22b499d961c1189f98
2015-10-30 10:49:59 -07:00
Kunal Mehta
74b50cad30
Move some boilerplate code into EchoEventFormatter
...
The conversion of EchoEvent into a EchoEventPresentationModel is now
done by EchoFlyoutFormatter, instead of having each subclass do it. It
also does the canRender() check so subclasses don't need to worry about
it.
The subclasses no longer have access to the underlying EchoEvent object,
so the timestamp is exposed in EchoEventPresentationModel.
Change-Id: I7f0a650373eebac7aa2231b1795b51a6d031ad67
2015-10-29 21:22:54 +00:00
Translation updater bot
a1282bcec0
Localisation updates from https://translatewiki.net .
...
Change-Id: I257b549ea4d8b6ea639dfdce463921c47a579d25
2015-10-29 21:23:34 +01:00
Kunal Mehta
94004aeda5
Re-enable presentation model for mentions
...
T116888 has been resolved.
Change-Id: I5380d06252878b8808e4c81e12de05145a3f992c
2015-10-29 10:52:04 -07:00
jenkins-bot
5b74ffce63
Merge "build: Enable phpcs rule 'MediaWiki.VariableAnalysis.UnusedGlobalVariables' and make pass"
2015-10-29 17:40:49 +00:00
jenkins-bot
f7ffecf3d8
Merge "build: Enable phpcs rule 'MediaWiki.WhiteSpace.SpaceAfterControlStructure.Incorrect' and make pass"
2015-10-29 17:39:48 +00:00
jenkins-bot
507c7f083a
Merge "build: Enable phpcs rule 'Squiz.Classes.ValidClassName.NotCamelCaps' and make pass"
2015-10-29 17:39:45 +00:00
jenkins-bot
0442658bf3
Merge "Document that text from getSecondaryLinks() isn't escaped"
2015-10-29 17:33:20 +00:00
jenkins-bot
a40ed3d4ca
Merge "Fix @return doc on EchoEventPresentationModel::getPrimaryLink()"
2015-10-29 17:33:18 +00:00
James D. Forrester
1e01328018
build: Enable phpcs rule 'MediaWiki.VariableAnalysis.UnusedGlobalVariables' and make pass
...
Change-Id: I1af3e34531ff9d02183a7ad0052712d9f137609c
2015-10-29 17:25:51 +00:00
James D. Forrester
9871108189
build: Enable phpcs rule 'MediaWiki.WhiteSpace.SpaceAfterControlStructure.Incorrect' and make pass
...
Change-Id: If230a568463a048b59138850ededa2b02fb61f46
2015-10-29 17:25:45 +00:00
James D. Forrester
a49e3a592e
build: Enable phpcs rule 'Squiz.Classes.ValidClassName.NotCamelCaps' and make pass
...
Change-Id: I3d8b9c04ef2be3fe456c2c66bb10afa11ba0cd45
2015-10-29 18:24:45 +01:00
James D. Forrester
429f0e47ae
build: Enable phpcs rule 'MediaWiki.NamingConventions.PrefixedGlobalFunctions.wfPrefix' and make pass
...
Change-Id: Iaffa931acfc2f0eb4b4a6cf61d63593bb860d25c
2015-10-29 13:06:44 +01:00
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
Kunal Mehta
39edc4ce48
Document that text from getSecondaryLinks() isn't escaped
...
Change-Id: Ia87faa54df7631522e41871d7bbb37345d5bce0e
2015-10-29 00:35:13 -07:00
Kunal Mehta
1e5ab0331e
Fix @return doc on EchoEventPresentationModel::getPrimaryLink()
...
Change-Id: I5ab5df0706395aa5393d2470ebbeadbaa4e7fe6b
2015-10-29 00:34:01 -07: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