Fixing clayless issues with Projections

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2013-02-04 11:33:22 -08:00
parent fca554ddc9
commit 2dfca7a776
6 changed files with 6 additions and 6 deletions

View File

@@ -42,14 +42,14 @@ namespace Orchard.Projections.Providers.SortCriteria {
public void ApplyFilter(SortCriterionContext context, PropertyInfo property) {
bool ascending = Convert.ToBoolean(context.State.Sort);
bool ascending = Boolean.Parse(Convert.ToString(context.State.Sort));
context.Query = ascending
? context.Query.OrderBy(alias => alias.ContentPartRecord(property.DeclaringType), x => x.Asc(property.Name))
: context.Query.OrderBy(alias => alias.ContentPartRecord(property.DeclaringType), x => x.Desc(property.Name));
}
public LocalizedString DisplaySortCriterion(SortCriterionContext context, string propertyName) {
bool ascending = Convert.ToBoolean(context.State.Sort);
bool ascending = Boolean.Parse(Convert.ToString(context.State.Sort));
if (ascending) {
return T("Ordered by {0}, ascending", propertyName);