Merge "Remove footer from email notification excerpt"

This commit is contained in:
jenkins-bot 2016-02-24 21:35:57 +00:00 committed by Gerrit Code Review
commit 90ea4d8fff

View file

@ -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;
}