Robert Vogel has submitted this change and it was merged. Change subject: Fixed prepare message with html footer ......................................................................
Fixed prepare message with html footer Change-Id: I3f3a7ed5c2d6f5279d2ef231acf9cf9279c043e6 --- M includes/Mailer.class.php 1 file changed, 11 insertions(+), 11 deletions(-) Approvals: Robert Vogel: Verified; Looks good to me, approved Smuggli: Looks good to me, but someone else must approve jenkins-bot: Checked Objections: Mglaser: There's a problem with this change, please improve diff --git a/includes/Mailer.class.php b/includes/Mailer.class.php index f6dcc59..a27b883 100644 --- a/includes/Mailer.class.php +++ b/includes/Mailer.class.php @@ -107,23 +107,23 @@ $sCombinedSubject = '['.$wgSitename.'] '.$sSubject; //Prepare message + if ( $this->bSendHTML ) { + //http(s)://link -> <a href="http(s)://link>http(s)://link</a>" + //! already followed by </a> + //last char ! "." + $sMsg = preg_replace( + "#(\s|/>)(https?://[^\s]+?)\.?([\s|<])#", + '<a href="$2">$2</a>', + $sMsg + ); + } + $sFooter = ( $this->bSendHTML ) ? "<br /><br />---------------------<br /><br />" : "\n\n---------------------\n\n"; $sFooter .= wfMessage( 'bs-email-footer', $wgSitename )->plain() . ( $this->bSendHTML ) ? "<br /><br />---------------------" : "\n\n---------------------"; $sCombinedMsg = $sMsg.$sFooter; - - if ( $this->bSendHTML ) { - //http(s)://link -> <a href="http(s)://link>http(s)://link</a>" - //! already followed by </a> - //last char ! "." - $sCombinedMsg = preg_replace( - "#(\s|/>)(https?://[^\s]+?)\.?([\s|<])#", - '<a href="$2">$2</a>', - $sCombinedMsg - ); - } foreach ( $aEmailTo as $aReceiver ) { //Prepare message -- To view, visit https://gerrit.wikimedia.org/r/166731 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3f3a7ed5c2d6f5279d2ef231acf9cf9279c043e6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation Gerrit-Branch: master Gerrit-Owner: Pwirth <wi...@hallowelt.biz> Gerrit-Reviewer: Mglaser <gla...@hallowelt.biz> Gerrit-Reviewer: Pigpen <reym...@hallowelt.biz> Gerrit-Reviewer: Robert Vogel <vo...@hallowelt.biz> Gerrit-Reviewer: Smuggli <mug...@hallowelt.biz> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits