From df80d39954c0af86de13696e6f080644f30491ec Mon Sep 17 00:00:00 2001 From: gmorel Date: Tue, 17 Sep 2013 17:11:08 +0200 Subject: [PATCH] Working : Content : fix loop giving no elements --- core/lib/Thelia/Core/Template/Loop/Content.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/lib/Thelia/Core/Template/Loop/Content.php b/core/lib/Thelia/Core/Template/Loop/Content.php index 4154b3d7a..4ac061c3f 100755 --- a/core/lib/Thelia/Core/Template/Loop/Content.php +++ b/core/lib/Thelia/Core/Template/Loop/Content.php @@ -102,12 +102,13 @@ class Content extends BaseI18nLoop if (!is_null($folder) || !is_null($folderDefault)) { + $folders = array(); if (!is_null($folder)) { - $folders = FolderQuery::create()->filterById($folder, Criteria::IN)->find(); + $folders = array_merge($folders, FolderQuery::create()->filterById($folder, Criteria::IN)->find()); } if (!is_null($folderDefault)) { - $folders = FolderQuery::create()->filterById($folderDefault, Criteria::IN)->find(); + $folders = array_merge(FolderQuery::create()->filterById($folderDefault, Criteria::IN)->find()); }