Skip to content

Commit

Permalink
Merge pull request #21077 from johntwyman/fix-setPreUpgradeMessage-fu…
Browse files Browse the repository at this point in the history
…nction

Fix the check to see if the financialAclExtension is installed
  • Loading branch information
eileenmcnaughton authored Aug 10, 2021
2 parents 2ce78b4 + c00378d commit 1198660
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CRM/Upgrade/Incremental/General.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ public static function setPreUpgradeMessage(&$preUpgradeMessage, $currentVer, $l
}

$ftAclSetting = Civi::settings()->get('acl_financial_type');
$financialAclExtension = civicrm_api3('extension', 'get', ['key' => 'biz.jmaconsulting.financialaclreport']);
if ($ftAclSetting && (($financialAclExtension['count'] == 1 && $financialAclExtension['status'] != 'Installed') || $financialAclExtension['count'] !== 1)) {
$financialAclExtension = civicrm_api3('extension', 'get', ['key' => 'biz.jmaconsulting.financialaclreport', 'sequential' => 1]);
if ($ftAclSetting && (($financialAclExtension['count'] == 1 && $financialAclExtension['values'][0]['status'] != 'Installed') || $financialAclExtension['count'] !== 1)) {
$preUpgradeMessage .= '<br />' . ts('CiviCRM will in the future require the extension %1 for CiviCRM Reports to work correctly with the Financial Type ACLs. The extension can be downloaded <a href="%2">here</a>', [
1 => 'biz.jmaconsulting.financialaclreport',
2 => 'https://github.com/JMAConsulting/biz.jmaconsulting.financialaclreport',
Expand Down

0 comments on commit 1198660

Please sign in to comment.