mediawiki-extensions-Echo/includes/formatters/MentionFormatter.php
Matthias Mullie 9fe71a1182 Get rid of old flyout formatter code
This code is completely useless:
* for format=flyout, the new EchoFlyoutFormatter.php will be run
* and even that one has already been deprecated as it was replaced
  by format=model (flyout html is now built in client)

Change-Id: Iea23abb66397ecc4efb575fe33fdbedc5b4e0f70
2016-02-05 06:56:15 +00:00

24 lines
738 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', 'user' )
);
$this->email['batch-body'] = array(
'message' => 'notification-mention-nosection-email-batch-body',
'params' => array( 'agent', 'main-title-text', 'user' )
);
}
}
}