From 35083977312f4d424196dcc78b6164287b6d10f0 Mon Sep 17 00:00:00 2001 From: Franck Allimant Date: Fri, 4 Apr 2014 12:04:42 +0200 Subject: [PATCH] Fixed updateRates() method --- core/lib/Thelia/Action/Currency.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/lib/Thelia/Action/Currency.php b/core/lib/Thelia/Action/Currency.php index 5e391c2bc..2d3a70c45 100644 --- a/core/lib/Thelia/Action/Currency.php +++ b/core/lib/Thelia/Action/Currency.php @@ -26,6 +26,7 @@ namespace Thelia\Action; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; +use Thelia\Core\Event\ActionEvent; use Thelia\Model\CurrencyQuery; use Thelia\Model\Currency as CurrencyModel; @@ -134,7 +135,7 @@ class Currency extends BaseAction implements EventSubscriberInterface } } - public function updateRates(EventDispatcherInterface $dispatcher) + public function updateRates(ActionEvent $event) { $rates_url = ConfigQuery::read('currency_rate_update_url', 'http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml'); @@ -148,7 +149,7 @@ class Currency extends BaseAction implements EventSubscriberInterface if (null !== $currency = CurrencyQuery::create()->findOneByCode($code)) { $currency - ->setDispatcher($dispatcher) + ->setDispatcher($event->getDispatcher()) ->setRate($rate) ->save() ;