From 54441cf69ea23f77149e39cac0153cc87bc80576 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Mon, 30 Jan 2023 14:04:26 +1300 Subject: [PATCH] Add preUpgrade message --- CRM/Upgrade/Incremental/php/FiveFiftyNine.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CRM/Upgrade/Incremental/php/FiveFiftyNine.php b/CRM/Upgrade/Incremental/php/FiveFiftyNine.php index f0573ceecc..c5250703cb 100644 --- a/CRM/Upgrade/Incremental/php/FiveFiftyNine.php +++ b/CRM/Upgrade/Incremental/php/FiveFiftyNine.php @@ -21,13 +21,22 @@ */ class CRM_Upgrade_Incremental_php_FiveFiftyNine extends CRM_Upgrade_Incremental_Base { + public function setPreUpgradeMessage(&$preUpgradeMessage, $rev, $currentVer = NULL): void { + if ($rev === '5.59.alpha1') { + if (empty(CRM_Core_Config::singleton()->userSystem->is_wordpress)) { + $preUpgradeMessage .= '

' . ts('The handling of invalid smarty template code in mailings, reminders and other automated messages has changed . For details, see upgrade notes.', + [1 => 'href="https://docs.civicrm.org/sysadmin/en/latest/upgrade/version-specific/#civicrm-559" target="_blank"']) . '

'; + } + } + } + /** * Upgrade step; adds tasks including 'runSql'. * * @param string $rev * The version number matching this function name */ - public function upgrade_5_59_alpha1($rev): void { + public function upgrade_5_59_alpha1(string $rev): void { $this->addTask(ts('Upgrade DB to %1: SQL', [1 => $rev]), 'runSql', $rev); $this->addTask('Drop column civicrm_custom_field.mask', 'dropColumn', 'civicrm_custom_field', 'mask'); } -- 2.25.1