Merge pull request #279 from roadster31/labels

Labels
This commit is contained in:
Manuel Raynaud
2014-04-10 12:04:36 +02:00
4 changed files with 168 additions and 40 deletions

View File

@@ -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;
@@ -130,7 +131,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');
@@ -144,7 +145,7 @@ class Currency extends BaseAction implements EventSubscriberInterface
if (null !== $currency = CurrencyQuery::create()->findOneByCode($code)) {
$currency
->setDispatcher($dispatcher)
->setDispatcher($event->getDispatcher())
->setRate($rate)
->save()
;