Fix bug when trying to order by title

modifié:         core/lib/Thelia/Core/Template/Loop/Module.php
This commit is contained in:
Benjamin Perche
2014-06-26 15:04:25 +02:00
parent 33862b39b5
commit f533048fbb

View File

@@ -69,7 +69,7 @@ class Module extends BaseI18nLoop implements PropelSearchLoopInterface
new Argument(
'order',
new TypeCollection(
new Type\EnumListType(array('id', 'id_reverse', 'code', 'code_reverse', 'alpha', 'alpha_reverse', 'manual', 'manual_reverse', 'enabled', 'enabled_reverse'))
new Type\EnumListType(array('id', 'id_reverse', 'code', 'code_reverse', 'title', 'title_reverse', 'manual', 'manual_reverse', 'enabled', 'enabled_reverse'))
),
'manual'
),
@@ -133,10 +133,10 @@ class Module extends BaseI18nLoop implements PropelSearchLoopInterface
case "id_reverse":
$search->orderById(Criteria::DESC);
break;
case "alpha":
case "title":
$search->addAscendingOrderByColumn('i18n_TITLE');
break;
case "alpha_reverse":
case "title_reverse":
$search->addDescendingOrderByColumn('i18n_TITLE');
break;
case "code":