mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-13 17:57:21 +00:00
Merge "Remove footer from email notification excerpt"
This commit is contained in:
commit
90ea4d8fff
|
@ -1082,7 +1082,9 @@ class EchoHooks {
|
|||
|
||||
$autoSubject = wfMessage( 'defemailsubject', $from->name )->inContentLanguage()->text();
|
||||
if ( $subject === $autoSubject ) {
|
||||
$preview = $wgContLang->truncate( $text, 125 );
|
||||
$autoFooter = "\n\n-- \n" . wfMessage( 'emailuserfooter', $from->name, $address->name )->inContentLanguage()->text();
|
||||
$textWithoutFooter = preg_replace( '/' . preg_quote( $autoFooter, '/' ) . '$/', '', $text );
|
||||
$preview = $wgContLang->truncate( $textWithoutFooter, 125 );
|
||||
} else {
|
||||
$preview = $subject;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue