From: Seamus Lee Date: Sun, 16 Jun 2019 22:31:28 +0000 (+1000) Subject: Alter PSR16 code to take into account of new entitysetting release with upgraded... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=6094fa7e2a34ff01a2b2912239e0e47a139f262a;p=civicrm-core.git Alter PSR16 code to take into account of new entitysetting release with upgraded caching --- diff --git a/CRM/Core/BAO/Cache/Psr16.php b/CRM/Core/BAO/Cache/Psr16.php index b1de191996..953d079618 100644 --- a/CRM/Core/BAO/Cache/Psr16.php +++ b/CRM/Core/BAO/Cache/Psr16.php @@ -199,9 +199,6 @@ class CRM_Core_BAO_Cache_Psr16 { // civihr/uk.co.compucorp.civicrm.hrcore 'HRCore_Info', - // nz.co.fuzion.entitysetting - 'CiviCRM setting Spec', - ]; // Handle Legacy Multisite caching group. $extensions = CRM_Extension_System::singleton()->getManager(); @@ -216,6 +213,17 @@ class CRM_Core_BAO_Cache_Psr16 { $groups[] = 'descendant groups for an org'; } } + $entitySettingExtensionStatus = $extensions->getStatus('nz.co.fuzion.entitysetting'); + if ($multisiteExtensionStatus == $extensions::STATUS_INSTALLED) { + $extension_version = civicrm_api3('Extension', 'get', ['key' => 'nz.co.fuzion.entitysetting'])['values'][0]['version']; + if (version_compare($extension_version, '1.3', '<')) { + Civi::log()->warning( + 'CRM_Core_BAO_Cache_PSR is deprecated for entity setting extension, you should upgrade to the latest version to avoid this warning, this code will be removed at the end of 2019', + ['civi.tag' => 'deprecated'] + ); + $groups[] = 'CiviCRM setting Spec'; + } + } return $groups; }