mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-27 17:20:40 +00:00
Merge "EchoPlainTextEmailFormatter: correctly handle getPrimaryLink() returning false"
This commit is contained in:
commit
1c812bddc0
|
@ -14,10 +14,12 @@ class EchoPlainTextEmailFormatter extends EchoEventFormatter {
|
|||
}
|
||||
|
||||
$primaryLink = $model->getPrimaryLinkWithMarkAsRead();
|
||||
|
||||
$primaryUrl = wfExpandUrl( $primaryLink['url'], PROTO_CANONICAL );
|
||||
$colon = $this->msg( 'colon-separator' )->text();
|
||||
|
||||
if ( $primaryLink ) {
|
||||
$primaryUrl = wfExpandUrl( $primaryLink['url'], PROTO_CANONICAL );
|
||||
$text .= "\n\n{$primaryLink['label']}$colon <$primaryUrl>";
|
||||
}
|
||||
|
||||
foreach ( array_filter( $model->getSecondaryLinks() ) as $secondaryLink ) {
|
||||
$url = wfExpandUrl( $secondaryLink['url'], PROTO_CANONICAL );
|
||||
|
|
Loading…
Reference in a new issue