Awight has submitted this change and it was merged.

Change subject: Move linebreaking back into Mailer::normalizeContent
......................................................................


Move linebreaking back into Mailer::normalizeContent

Breaking the lines in thank_you_render was adding newlines inside
the template info comment, making it impossible to add CiviMail
records for thank you templates.

Change-Id: Id842dcfde654c1dbd64d3de5b8b5fcd19cbe4ea6
---
M sites/all/modules/thank_you/thank_you.module
M sites/all/modules/wmf_communication/Mailer.php
2 files changed, 1 insertion(+), 2 deletions(-)

Approvals:
  Awight: Verified; Looks good to me, approved



diff --git a/sites/all/modules/thank_you/thank_you.module 
b/sites/all/modules/thank_you/thank_you.module
index 55719a2..30a7fcf 100644
--- a/sites/all/modules/thank_you/thank_you.module
+++ b/sites/all/modules/thank_you/thank_you.module
@@ -724,7 +724,6 @@
 
     $page_content = $template->render( 'html' );
     $page_content = str_replace( '<p></p>', '', $page_content );
-    $page_content = wordwrap( $page_content, 100 );
     return $page_content;
 }
 
diff --git a/sites/all/modules/wmf_communication/Mailer.php 
b/sites/all/modules/wmf_communication/Mailer.php
index 94b2739..647bfdd 100644
--- a/sites/all/modules/wmf_communication/Mailer.php
+++ b/sites/all/modules/wmf_communication/Mailer.php
@@ -122,7 +122,7 @@
 
     protected function normalizeContent( &$email ) {
         $converter = new Html2Text( $email['html'], false, array( 'do_links' 
=> 'table' ) );
-        $email['plaintext'] = $converter->get_text();
+        $email['plaintext'] = wordwrap( $converter->get_text(), 100 );
 
         if ( $email['plaintext'] === false ) {
             watchdog( 'thank_you', "Text rendering of template failed in 
{$email['locale']}.", array(), WATCHDOG_ERROR );

-- 
To view, visit https://gerrit.wikimedia.org/r/169565
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id842dcfde654c1dbd64d3de5b8b5fcd19cbe4ea6
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg <eeggles...@wikimedia.org>
Gerrit-Reviewer: Awight <awi...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to