Merge branch 'master' into template

This commit is contained in:
Etienne Roudeix
2013-09-20 16:32:42 +02:00
28 changed files with 716 additions and 186 deletions

View File

@@ -44,8 +44,8 @@ class Folder extends BaseFolder
foreach($children as $child)
{
$contentsCount += ProductQuery::create()
->filterByCategory($child)
$contentsCount += ContentQuery::create()
->filterByFolder($child)
->count();
}

View File

@@ -44,8 +44,11 @@ trait UrlRewritingTrait {
*
* @param string $locale a valid locale (e.g. en_US)
*/
public function getUrl($locale)
public function getUrl($locale = null)
{
if(null === $locale) {
$locale = $this->getLocale();
}
return URL::getInstance()->retrieve($this->getRewrittenUrlViewName(), $this->getId(), $locale)->toString();
}