From 8f894382f60548c1da70e333770d912c14fa65f3 Mon Sep 17 00:00:00 2001 From: franck Date: Mon, 8 Jul 2013 11:03:54 +0200 Subject: [PATCH] Fixed loop arguments --- core/lib/Thelia/Core/Template/Loop/Feed.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/lib/Thelia/Core/Template/Loop/Feed.php b/core/lib/Thelia/Core/Template/Loop/Feed.php index 552e0dc3b..8d6626013 100644 --- a/core/lib/Thelia/Core/Template/Loop/Feed.php +++ b/core/lib/Thelia/Core/Template/Loop/Feed.php @@ -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];