upgrade message
authordemeritcowboy <demeritcowboy@hotmail.com>
Tue, 6 Dec 2022 12:37:48 +0000 (07:37 -0500)
committerdemeritcowboy <demeritcowboy@hotmail.com>
Tue, 6 Dec 2022 12:37:48 +0000 (07:37 -0500)
CRM/Upgrade/Incremental/php/FiveFiftySeven.php

index 33afb62b0ef5aacac37a21bb939e0d492c55b673..67bcc73df27dd0f207cc8e5dfb62830b19aaf5c5 100644 (file)
  */
 class CRM_Upgrade_Incremental_php_FiveFiftySeven extends CRM_Upgrade_Incremental_Base {
 
+  public function setPreUpgradeMessage(&$preUpgradeMessage, $rev, $currentVer = NULL) {
+    if ($rev === '5.57.alpha1') {
+      if (CRM_Core_DAO::singleValueQuery('SELECT COUNT(id) FROM civicrm_activity WHERE is_current_revision = 0')) {
+        $preUpgradeMessage .= '<p>' . ts('Your database contains CiviCase activity revisions which are deprecated and will begin to appear as duplicates in SearchKit/api4/etc.<ul><li>For further instructions see this <a %1>Lab Snippet</a>.</li></ul>', [1 => 'target="_blank" href="https://lab.civicrm.org/-/snippets/85"']) . '</p>';
+      }
+    }
+  }
+
   /**
    * Upgrade step; adds tasks including 'runSql'.
    *