Skip to content

Commit

Permalink
Merge pull request #20890 from demeritcowboy/ignore-log-upgrade-alt
Browse files Browse the repository at this point in the history
dev/core#2666 - (Alternate) Don't repeatedly log about crm-l10n.js during upgrade
  • Loading branch information
colemanw authored Jul 18, 2021
2 parents f93f03f + 89689b3 commit 07be8ef
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions CRM/Core/Resources/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,18 +205,20 @@ protected static function coreResourceList($region) {
];

// Dynamic localization script
$items[] = Civi::service('asset_builder')->getUrl('crm-l10n.js', [
'cid' => $contactID,
'includeEmailInName' => (bool) $settings->get('includeEmailInName'),
'ajaxPopupsEnabled' => (bool) $settings->get('ajaxPopupsEnabled'),
'allowAlertAutodismissal' => (bool) $settings->get('allow_alert_autodismissal'),
'resourceCacheCode' => Civi::resources()->getCacheCode(),
'locale' => CRM_Core_I18n::getLocale(),
'lcMessages' => $settings->get('lcMessages'),
'dateInputFormat' => $settings->get('dateInputFormat'),
'timeInputFormat' => $settings->get('timeInputFormat'),
'moneyFormat' => CRM_Utils_Money::format(1234.56),
]);
if (!CRM_Core_Config::isUpgradeMode()) {
$items[] = Civi::service('asset_builder')->getUrl('crm-l10n.js', [
'cid' => $contactID,
'includeEmailInName' => (bool) $settings->get('includeEmailInName'),
'ajaxPopupsEnabled' => (bool) $settings->get('ajaxPopupsEnabled'),
'allowAlertAutodismissal' => (bool) $settings->get('allow_alert_autodismissal'),
'resourceCacheCode' => Civi::resources()->getCacheCode(),
'locale' => CRM_Core_I18n::getLocale(),
'lcMessages' => $settings->get('lcMessages'),
'dateInputFormat' => $settings->get('dateInputFormat'),
'timeInputFormat' => $settings->get('timeInputFormat'),
'moneyFormat' => CRM_Utils_Money::format(1234.56),
]);
}

// These scripts are only needed by back-office users
if (CRM_Core_Permission::check('access CiviCRM')) {
Expand Down

0 comments on commit 07be8ef

Please sign in to comment.