CRM-17322 output upgrade as text
authorAdam Roses Wight <awight@wikimedia.org>
Thu, 1 Oct 2015 08:50:24 +0000 (01:50 -0700)
committermonishdeb <monish.deb@webaccessglobal.com>
Mon, 5 Oct 2015 20:32:05 +0000 (02:02 +0530)
This adds the 'text' array to the output params. There is a patch in drush to
print this rather than the html. wp-cli could do with such a patch too but out-of-scope here

Change-Id: Ib8ea9a2e056e225904cb96b2d0de815148ad3f8b

CRM/Upgrade/Headless.php

index 47a7046e146b99305ea948c6be4b6581f7294292..953aa9505979a1fdcf36ffc465169de917ab8bbe 100644 (file)
@@ -76,9 +76,11 @@ class CRM_Upgrade_Headless {
 
     CRM_Upgrade_Form::doFinish();
 
+    $message = file_get_contents($postUpgradeMessageFile);
     return array(
       'latestVer' => $latestVer,
-      'message' => file_get_contents($postUpgradeMessageFile),
+      'message' => $message,
+      'text' => CRM_Utils_String::htmlToText($message),
     );
   }