Remove references to CRM_Upgrade_Incremental_php_FourSeven class
authorColeman Watts <coleman@civicrm.org>
Wed, 12 Apr 2023 14:34:40 +0000 (10:34 -0400)
committerColeman Watts <coleman@civicrm.org>
Wed, 12 Apr 2023 14:34:40 +0000 (10:34 -0400)
CRM/Upgrade/Incremental/Base.php
Civi/Core/SettingsBag.php

index 4171e4b5dc9e09a65d6f2675aaa4b1afd6fdfac5..75ffcb970899e3fba4edba8057fde72f9fbe1e23 100644 (file)
@@ -76,7 +76,6 @@ class CRM_Upgrade_Incremental_Base {
    * This method will be invoked multiple times. Implementations MUST consult the `$rev`
    * before deciding what messages to add. See the examples linked below.
    *
-   * @see \CRM_Upgrade_Incremental_php_FourSeven::setPreUpgradeMessage()
    * @see \CRM_Upgrade_Incremental_php_FiveTwenty::setPreUpgradeMessage()
    *
    * @param string $preUpgradeMessage
@@ -101,7 +100,6 @@ class CRM_Upgrade_Incremental_Base {
    * This method will be invoked multiple times. Implementations MUST consult the `$rev`
    * before deciding what messages to add. See the examples linked below.
    *
-   * @see \CRM_Upgrade_Incremental_php_FourSeven::setPostUpgradeMessage()
    * @see \CRM_Upgrade_Incremental_php_FiveTwentyOne::setPostUpgradeMessage()
    *
    * @param string $postUpgradeMessage
index be51cc6ae41543310fe843c4e62f3691f7a74e9a..0c69538dbc5d9e9e7ea273c034513fa10d58020a 100644 (file)
@@ -115,22 +115,9 @@ class SettingsBag {
     $this->values = [];
     $this->combined = NULL;
 
-    // Ordinarily, we just load values from `civicrm_setting`. But upgrades require care.
-    // In v4.0 and earlier, all values were stored in `civicrm_domain.config_backend`.
-    // In v4.1-v4.6, values were split between `civicrm_domain` and `civicrm_setting`.
-    // In v4.7+, all values are stored in `civicrm_setting`.
-    // Whenever a value is available in civicrm_setting, it will take precedence.
-
     $isUpgradeMode = \CRM_Core_Config::isUpgradeMode();
 
-    if ($isUpgradeMode && empty($this->contactId) && \CRM_Core_BAO_SchemaHandler::checkIfFieldExists('civicrm_domain', 'config_backend', FALSE)) {
-      $config_backend = \CRM_Core_DAO::singleValueQuery('SELECT config_backend FROM civicrm_domain WHERE id = %1',
-        [1 => [$this->domainId, 'Positive']]);
-      $oldSettings = \CRM_Upgrade_Incremental_php_FourSeven::convertBackendToSettings($this->domainId, $config_backend);
-      \CRM_Utils_Array::extend($this->values, $oldSettings);
-    }
-
-    // Normal case. Aside: Short-circuit prevents unnecessary query.
+    // Only query table if it exists.
     if (!$isUpgradeMode || \CRM_Core_DAO::checkTableExists('civicrm_setting')) {
       $dao = \CRM_Core_DAO::executeQuery($this->createQuery()->toSQL());
       while ($dao->fetch()) {