mediawiki-extensions-Echo/includes
Stephane Bisson 1ebb8e3daa Don't add CommentStoreComment as plaintext params
Follow-up Icfc8516 and I3d997f9 (migrating from deprecated Revision
to RevisionRecord)

When generating 'edit-user-talk' events, if we don't have the section-text,
we use the edit summary instead.

Revision->getComment() returns a string but RevisionRecord->getComment()
returns a CommentStoreComment. As a result of the migration, an instance
of CommentStoreComment was put into the event 'extra_data' and later
added as a plain text params during notification presentation.

This patch proposes to
1) Make sure to add the comment's TEXT to the event
2) Test that the 'section-text' is a string before using it
   as a message parameter. This will cause faulty notifications to
   render without a body instead of erroring out. We could write a
   maintenance script to fix those notifications but I don't
   think it's worth it.

Bug: T223741
Change-Id: Ie3a1c59a43b0981ec42fc77e7ebb0e8bd132dbe2
2019-05-21 11:44:54 -04:00
..
api build: Upgrade mediawiki/mediawiki-phan-config from 0.5.0 to 0.6.0 and make pass 2019-05-19 13:33:12 +02:00
cache Remove usage of deprecated Revision class in Echo 2019-05-08 19:50:58 +01:00
controller Remove per-type notify-type-availability (make it category-only) 2019-04-26 17:36:10 -07:00
exception Hygiene: Update method documentation & split exception to a file 2014-08-04 17:43:57 -07:00
formatters Don't add CommentStoreComment as plaintext params 2019-05-21 11:44:54 -04:00
gateway Pass string as field to IDatabase::selectField and ::selectRowCount 2019-03-02 17:29:29 +00:00
iterator Fix some doc blocks 2017-11-07 17:06:17 +01:00
jobs NotificationJob: make sure we retry to load the event from master 2019-04-16 17:06:48 -07:00
mapper Make use of the PHP 7 ?? operator where it makes sense 2019-05-09 15:57:16 +00:00
model Remove unused method EchoEvent::isDismissable() 2019-05-18 17:37:54 +02:00
ooui Use local vars in LabelIconWidget 2019-02-23 21:26:35 +01:00
special Remove per-type notify-type-availability (make it category-only) 2019-04-26 17:36:10 -07:00
AttributeManager.php Make use of the PHP 7 ?? operator where it makes sense 2019-05-09 15:57:16 +00:00
Bundleable.php Remove some non-helpful lines of documentation 2018-07-06 15:14:44 +00:00
Bundler.php build: Update mediawiki/mediawiki-codesniffer to 0.7.1 2016-12-05 15:54:30 -08:00
DataOutputFormatter.php Remove usage of deprecated Revision class in Echo 2019-05-08 19:50:58 +01:00
DeferredMarkAsDeletedUpdate.php Merge "Make "@… array" type hints more specific" 2018-08-16 00:57:12 +00:00
DiscussionParser.php Don't add CommentStoreComment as plaintext params 2019-05-21 11:44:54 -04:00
EchoArrayList.php Fix multiple PHP class declarations in one file 2018-01-21 21:17:53 +00:00
EchoCachedList.php Convert caching to WANObjectCache 2019-02-28 21:56:38 -08:00
EchoContainmentList.php Make "@… array" type hints more specific 2018-08-13 09:27:37 +02:00
EchoContainmentSet.php Convert caching to WANObjectCache 2019-02-28 21:56:38 -08:00
EchoDbFactory.php Code improvements for includes/ **only** directory 2019-03-05 18:58:52 +01:00
EchoDiffGroup.php Make "@… array" type hints more specific 2018-08-13 09:27:37 +02:00
EchoDiffParser.php Code improvements for includes/ **only** directory 2019-03-05 18:58:52 +01:00
EchoHooks.php Merge "Remove usage of deprecated Revision class in Echo" 2019-05-09 20:56:17 +00:00
EchoOnWikiList.php Code improvements for includes/ **only** directory 2019-03-05 18:58:52 +01:00
EchoSummaryParser.php Replace two regular expressions with cheap string manipulations 2018-10-11 10:59:04 +02:00
EmailBatch.php Remove usage of deprecated database access code from Echo 2019-05-07 20:46:07 +00:00
EmailFormat.php HTML email formatter using presentation model 2016-05-12 09:29:24 -04:00
EmailFrequency.php HTML email formatter using presentation model 2016-05-12 09:29:24 -04:00
EventLogging.php Code improvements for includes/ **only** directory 2019-03-05 18:58:52 +01:00
ForeignNotifications.php Use php null coalesce operator ?? 2019-03-12 21:04:00 +01:00
ForeignWikiRequest.php Add phan 2019-04-10 18:51:59 +02:00
Notifier.php Drop $wgNotificationReplyName, instead let just show the e-mail 2018-08-29 01:03:54 +00:00
NotifUser.php Cleanup transition flags 2019-04-17 22:07:14 -07:00
ResourceLoaderEchoImageModule.php Fix Illegal string offset 'ltr' in ResourceLoaderEchoImageModule.php 2017-03-27 23:46:45 +00:00
schemaUpdate.php Code improvements for includes/ **only** directory 2019-03-05 18:58:52 +01:00
SeenTime.php Remove usage of deprecated cache code from Echo 2019-04-17 15:22:37 +01:00
UnreadWikis.php Merge "Use "false" as type hint in PHPDoc tags" 2018-08-16 01:00:05 +00:00
UserLocator.php Remove usage of deprecated Revision class in Echo 2019-05-08 19:50:58 +01:00