Fixed loop arguments

This commit is contained in:
franck
2013-07-08 11:03:54 +02:00
parent 7646c05cd4
commit 8f894382f6

View File

@@ -73,21 +73,21 @@ class Feed extends BaseLoop
}
}
$feed = new \SimplePie($this->url, THELIA_ROOT . 'cache/feeds');
$feed = new \SimplePie($this->getArgValue('url'), THELIA_ROOT . 'cache/feeds');
$feed->init();
$feed->handle_content_type();
$feed->set_timeout($this->timeout);
$feed->set_timeout($this->getArgValue('timeout'));
$items = $feed->get_items();
$limit = min(count($tab), $this->limit);
$limit = min(count($items), $this->getArgValue('limit'));
$loopResult = new LoopResult();
for($idx = 0; $idx < $this->limit; $idx++) {
for($idx = 0; $idx < $limit; $idx++) {
$item = $items[$idx];