diff options
author | Brian Evans <grknight@gentoo.org> | 2020-10-02 13:57:00 -0400 |
---|---|---|
committer | Brian Evans <grknight@gentoo.org> | 2020-10-02 13:57:00 -0400 |
commit | ab2071c71446a71888e4c9762cdce102bf9e29a3 (patch) | |
tree | 9ce07fbfd979a5898f21239c8f8f5b3d3cbdfc21 /Echo/includes/formatters/MentionInSummaryPresentationModel.php | |
parent | Add PluggableAuth extension for OpenID Connect (diff) | |
download | extensions-ab2071c71446a71888e4c9762cdce102bf9e29a3.tar.gz extensions-ab2071c71446a71888e4c9762cdce102bf9e29a3.tar.bz2 extensions-ab2071c71446a71888e4c9762cdce102bf9e29a3.zip |
Update Echo to 1.35
Signed-off-by: Brian Evans <grknight@gentoo.org>
Diffstat (limited to 'Echo/includes/formatters/MentionInSummaryPresentationModel.php')
-rw-r--r-- | Echo/includes/formatters/MentionInSummaryPresentationModel.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Echo/includes/formatters/MentionInSummaryPresentationModel.php b/Echo/includes/formatters/MentionInSummaryPresentationModel.php index bda17118..74f17603 100644 --- a/Echo/includes/formatters/MentionInSummaryPresentationModel.php +++ b/Echo/includes/formatters/MentionInSummaryPresentationModel.php @@ -1,5 +1,7 @@ <?php +use MediaWiki\Revision\RevisionRecord; + class EchoMentionInSummaryPresentationModel extends EchoEventPresentationModel { public function getIconType() { @@ -13,15 +15,15 @@ class EchoMentionInSummaryPresentationModel extends EchoEventPresentationModel { public function getHeaderMessage() { $msg = $this->getMessageWithAgent( 'notification-header-mention-summary' ); $msg->params( $this->getViewingUserForGender() ); - $msg->params( $this->getTruncatedTitleText( $this->event->getTitle() ) ); + $msg->params( $this->getTruncatedTitleText( $this->event->getTitle(), true ) ); return $msg; } public function getBodyMessage() { - if ( $this->userCan( Revision::DELETED_COMMENT ) ) { - $revision = $this->event->getRevision(); - $summary = $revision->getComment(); + $revision = $this->event->getRevision(); + if ( $revision && $revision->getComment() && $this->userCan( RevisionRecord::DELETED_COMMENT ) ) { + $summary = $revision->getComment()->text; $summary = Linker::formatComment( $summary ); $summary = Sanitizer::stripAllTags( $summary ); |