Unverified Commit 81af587a authored by Seamus Lee's avatar Seamus Lee Committed by GitHub

Merge pull request #14505 from seamuslee001/legacy_psr16_multisite

Update PSR16 handling for multisite extension legacy caching group
parents c321e2d9 a4ed897c
......@@ -180,7 +180,7 @@ class CRM_Core_BAO_Cache_Psr16 {
* @return array
*/
public static function getLegacyGroups() {
return [
$groups = [
// Core
'CiviCRM Search PrevNextCache',
'contact fields',
......@@ -202,9 +202,21 @@ class CRM_Core_BAO_Cache_Psr16 {
// nz.co.fuzion.entitysetting
'CiviCRM setting Spec',
// org.civicrm.multisite
'descendant groups for an org',
];
// Handle Legacy Multisite caching group.
$extensions = CRM_Extension_System::singleton()->getManager();
$multisiteExtensionStatus = $extensions->getStatus('org.civicrm.multisite');
if ($multisiteExtensionStatus == $extensions::STATUS_INSTALLED) {
$extension_version = civicrm_api3('Extension', 'get', ['key' => 'org.civicrm.multisite'])['values'][0]['version'];
if (version_compare($extension_version, '2.7', '<')) {
Civi::log()->warning(
'CRM_Core_BAO_Cache_PSR is deprecated for multisite 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[] = 'descendant groups for an org';
}
}
return $groups;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment