summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2020-10-02 13:57:00 -0400
committerBrian Evans <grknight@gentoo.org>2020-10-02 13:57:00 -0400
commitab2071c71446a71888e4c9762cdce102bf9e29a3 (patch)
tree9ce07fbfd979a5898f21239c8f8f5b3d3cbdfc21 /Echo/includes/formatters/MentionInSummaryPresentationModel.php
parentAdd PluggableAuth extension for OpenID Connect (diff)
downloadextensions-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.php10
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 );