mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-23 23:44:53 +00:00
Unbreak notformat=text|html in the API
Just pass any unknown formats through. Change-Id: I156b49a959b5453cd37cd4c3d58652b5420132f3
This commit is contained in:
parent
4a2c663867
commit
cfdc6cb3d0
|
@ -18,7 +18,6 @@ class EchoDataOutputFormatter {
|
|||
* @var array Mapping of new formatter to old formatter type
|
||||
*/
|
||||
protected static $legacyMapping = array(
|
||||
'flyout' => 'flyout',
|
||||
'special' => 'html',
|
||||
);
|
||||
|
||||
|
@ -146,7 +145,11 @@ class EchoDataOutputFormatter {
|
|||
$formatter = new self::$formatters[$format]( $user, $lang );
|
||||
return $formatter->format( $event );
|
||||
} else {
|
||||
$legacyFormat = self::$legacyMapping[$format];
|
||||
if ( isset( self::$legacyMapping[$format] ) ) {
|
||||
$legacyFormat = self::$legacyMapping[$format];
|
||||
} else {
|
||||
$legacyFormat = $format;
|
||||
}
|
||||
// Legacy b/c
|
||||
return EchoNotificationController::formatNotification( $event, $user, $legacyFormat );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue