From 8a0199a376519cafd0335b2632d961f799a1bbd0 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Sun, 6 Oct 2019 17:49:16 +0100 Subject: [PATCH] extension-compatibility - Update DB state of force-uninstalled extensions Note: 1. This is more advisory than functional - the functionality is really in the runtime bits in the previous commits. 2. Technically, this is more of a disable, but we should keep the record around in `civicrm_extension` so that we know the old schema revision. --- CRM/Upgrade/Form.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CRM/Upgrade/Form.php b/CRM/Upgrade/Form.php index 5880076991..e7159de55e 100644 --- a/CRM/Upgrade/Form.php +++ b/CRM/Upgrade/Form.php @@ -673,6 +673,11 @@ SET version = '$version' $messages[] = ts('The obsolete extension %1 could not be removed due to an error. It is recommended to remove this extension manually.', [1 => $key]); } } + if (!empty($obsolete['force-uninstall'])) { + CRM_Core_DAO::executeQuery('UPDATE civicrm_extension SET is_active = 0 WHERE full_name = %1', [ + 1 => [$key, 'String'], + ]); + } } } if ($messages) { -- 2.25.1