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/RevertedPresentationModel.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/RevertedPresentationModel.php')
-rw-r--r--Echo/includes/formatters/RevertedPresentationModel.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/Echo/includes/formatters/RevertedPresentationModel.php b/Echo/includes/formatters/RevertedPresentationModel.php
index 04d63b93..46ce1db0 100644
--- a/Echo/includes/formatters/RevertedPresentationModel.php
+++ b/Echo/includes/formatters/RevertedPresentationModel.php
@@ -1,5 +1,7 @@
<?php
+use MediaWiki\Revision\RevisionRecord;
+
class EchoRevertedPresentationModel extends EchoEventPresentationModel {
public function getIconType() {
@@ -19,8 +21,11 @@ class EchoRevertedPresentationModel extends EchoEventPresentationModel {
public function getBodyMessage() {
$summary = $this->event->getExtraParam( 'summary' );
- if ( !$this->isAutomaticSummary( $summary ) && $this->userCan( Revision::DELETED_COMMENT ) ) {
- $msg = $this->msg( "notification-body-{$this->type}" );
+ if (
+ !$this->isAutomaticSummary( $summary ) &&
+ $this->userCan( RevisionRecord::DELETED_COMMENT )
+ ) {
+ $msg = $this->msg( 'notification-body-reverted' );
$msg->plaintextParams( $this->formatSummary( $summary ) );
return $msg;
} else {
@@ -49,7 +54,7 @@ class EchoRevertedPresentationModel extends EchoEventPresentationModel {
$title = $this->event->getTitle();
if ( $title->canHaveTalkPage() ) {
$links[] = $this->getPageLink(
- $title->getTalkPage(), null, true
+ $title->getTalkPage(), '', true
);
}
@@ -82,4 +87,8 @@ class EchoRevertedPresentationModel extends EchoEventPresentationModel {
protected function getSubjectMessageKey() {
return 'notification-reverted-email-subject2';
}
+
+ public function getSubjectMessage() {
+ return parent::getSubjectMessage()->params( $this->getNumberOfEdits() );
+ }
}