mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-28 01:30:15 +00:00
9d08c96fad
Mainly because I was annoyed at m<tab>o<tab>d<tab>u<tab> to reach modules/. Change-Id: Ib149cb2e2612ccddd0503f9d0c5d05b554860a00
28 lines
878 B
PHP
28 lines
878 B
PHP
<?php
|
|
|
|
class EchoMentionFormatter extends EchoCommentFormatter {
|
|
/**
|
|
* {@inheritDoc}
|
|
*/
|
|
protected function applyChangeBeforeFormatting( EchoEvent $event, User $user, $type ) {
|
|
parent::applyChangeBeforeFormatting( $event, $user, $type );
|
|
|
|
// If we can't find a section title for the mention,
|
|
// fall back to `notification-mention-nosection`.
|
|
if ( !$this->getSectionTitle( $event, $user ) ) {
|
|
$this->title = array(
|
|
'message' => 'notification-mention-nosection',
|
|
'params' => array( 'agent', 'main-title-text', 'title' )
|
|
);
|
|
$this->flyoutTitle = array(
|
|
'message' => 'notification-mention-nosection-flyout',
|
|
'params' => array( 'agent', 'main-title-text', 'title' )
|
|
);
|
|
$this->email['batch-body'] = array(
|
|
'message' => 'notification-mention-nosection-email-batch-body',
|
|
'params' => array( 'agent', 'main-title-text' )
|
|
);
|
|
}
|
|
}
|
|
}
|