jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/373681 )
Change subject: Thank you generator fixes ...................................................................... Thank you generator fixes MW parser output now wraps everything in a div, so we don't need the <chunk> tags. Also, add an omitted 'use' statement. Change-Id: I483bc7937ca7b082c8192bfc8236c7d146c2636d --- M sites/all/modules/thank_you/generators/RenderTranslatedPage.php 1 file changed, 6 insertions(+), 5 deletions(-) Approvals: XenoRyet: Looks good to me, approved jenkins-bot: Verified diff --git a/sites/all/modules/thank_you/generators/RenderTranslatedPage.php b/sites/all/modules/thank_you/generators/RenderTranslatedPage.php index 68de60a..f13922c 100644 --- a/sites/all/modules/thank_you/generators/RenderTranslatedPage.php +++ b/sites/all/modules/thank_you/generators/RenderTranslatedPage.php @@ -1,4 +1,5 @@ <?php namespace thank_you\generators; +use wmf_communication\CiviMailingInsertException; use wmf_communication\CiviMailStore; /** @@ -305,12 +306,12 @@ ); } - // Load the partial DOM into a document, wrapping it with <chunk> tags (so there is only - // one top level node) and doing a multibyte conversion from whatever PHP is running under - // into UTF-8 (so that loadXML() doesn't throw a bitch fit and fail to load) + // Load the partial DOM into a document doing a multibyte conversion + // from whatever PHP is running under into UTF-8 (so that loadXML() + // doesn't throw a bitch fit and fail to load) $dom = new \DOMDocument( '1.0', 'UTF-8' ); $dom->preserveWhiteSpace = false; - $dom->loadXML( '<chunk>' . $j['parse']['text']['*'] . '</chunk>' ); + $dom->loadXML( $j['parse']['text']['*'] ); $dom->encoding = 'UTF-8'; $xpath = new \DOMXPath( $dom ); @@ -324,7 +325,7 @@ $node->parentNode->removeChild( $node ); } - // Save it, not outputting the freaking <xml> header and <chunk> tags + // Save it, not outputting the freaking <xml> header and wrapper div $result = array(); $dom->formatOutput = true; foreach( $dom->firstChild->childNodes as $node ) { -- To view, visit https://gerrit.wikimedia.org/r/373681 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I483bc7937ca7b082c8192bfc8236c7d146c2636d Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Ejegg <ej...@ejegg.com> Gerrit-Reviewer: XenoRyet <dkozlow...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits