Skip to content
Snippets Groups Projects
Commit 46289cf7 authored by totten's avatar totten
Browse files

(#2122) CiviEvent - Pre-upgrade warning

parent 46be4fd7
Branches
Tags
No related merge requests found
......@@ -33,6 +33,14 @@ class CRM_Upgrade_Incremental_php_FiveFortySeven extends CRM_Upgrade_Incremental
* @param null $currentVer
*/
public function setPreUpgradeMessage(&$preUpgradeMessage, $rev, $currentVer = NULL): void {
if ($rev === '5.47.alpha1' && version_compare($currentVer, '5.47', '<')) {
// Note: This warning should only exist within a few patch releases of 5.47. Do not merge-forward.
$prose = ts('<strong>CiviEvent users may have migration problems with v%1.</strong> CiviEvent users should consider v5.46 instead. <a %2>More information</a>', [
1 => CRM_Utils_System::version(),
2 => 'target="_blank" href="https://civicrm.org/redirect/event-timezone-5.47"',
]);
$preUpgradeMessage = '<p>' . $prose . '</p>' . $preUpgradeMessage;
}
if ($rev === '5.47.alpha1') {
$count = CRM_Core_DAO::singleValueQuery('SELECT count(*) FROM civicrm_contact WHERE preferred_mail_format != "Both"');
if ($count) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment