mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-12-01 02:46:46 +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();
|
$autoSubject = wfMessage( 'defemailsubject', $from->name )->inContentLanguage()->text();
|
||||||
if ( $subject === $autoSubject ) {
|
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 {
|
} else {
|
||||||
$preview = $subject;
|
$preview = $subject;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue