EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
Rate clear loaded map
Yuriiaa4c4d532533
diff --git a/application/Espo/Core/Acl/Events/InvalidateUserCache.php b/application/Espo/Core/Acl/Events/UserRoleUpdate.phpsimilarity index 100%rename from application/Espo/Core/Acl/Events/InvalidateUserCache.phprename to application/Espo/Core/Acl/Events/UserRoleUpdate.phpdiff --git a/application/Espo/Core/Acl/Events/InvalidatePortalUserCache.php b/application/Espo/Core/Portal/Acl/Events/PortalUserRoleUpdate.phpsimilarity index 100%rename from application/Espo/Core/Acl/Events/InvalidatePortalUserCache.phprename to application/Espo/Core/Portal/Acl/Events/PortalUserRoleUpdate.phpdiff --git a/application/Espo/Tools/Currency/RateEntryProvider.php b/application/Espo/Tools/Currency/RateEntryProvider.phpindex 351fbb06af..ac798cd6c5 100644--- a/application/Espo/Tools/Currency/RateEntryProvider.php+++ b/application/Espo/Tools/Currency/RateEntryProvider.php@@ -33,10 +33,12 @@ use Espo\Core\Currency\ConfigDataProvider;use Espo\Core\Currency\InternalRateEntryProvider;use Espo\Core\Field\Date;use Espo\Core\Utils\DateTime;+use Espo\Core\Utils\Event\EventDispatcher;use Espo\Entities\CurrencyRecord;use Espo\Entities\CurrencyRecordRate;use Espo\ORM\EntityManager;use Espo\ORM\Query\Part\Order;+use Espo\Tools\Currency\Events\CurrencyRateUpdate;use Espo\Tools\Currency\Exceptions\NotEnabled;use WeakMap;@@ -53,8 +55,13 @@ class RateEntryProviderprivate EntityManager $entityManager,private DateTime $dateTime,private InternalRateEntryProvider $internalRateEntryProvider,+ private EventDispatcher $eventDispatcher,) {$this->map = new WeakMap();++ $this->eventDispatcher->subscribe(CurrencyRateUpdate::class, function () {+ $this->map = new WeakMap();+ });}public function getCurrentRateEntry(CurrencyRecord $record): ?CurrencyRecordRate