Cleaning filters

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2013-02-20 09:39:39 -08:00
parent 06f21a14a6
commit 4c694ab97d
2 changed files with 3 additions and 2 deletions

View File

@@ -27,7 +27,7 @@ namespace Orchard.Projections.Providers.Filters {
}
public void ApplyFilter(FilterContext context) {
var contentTypes = Convert.ToString(context.State.ContentTypes);
var contentTypes = (string)context.State.ContentTypes;
if (!String.IsNullOrEmpty(contentTypes)) {
context.Query = context.Query.ForType(contentTypes.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries));
}

View File

@@ -31,7 +31,8 @@ namespace Orchard.Tags.Projections {
}
public void ApplyFilter(dynamic context) {
string tags = Convert.ToString(context.State.TagIds);
var tags = (string)context.State.TagIds;
if (!String.IsNullOrEmpty(tags)) {
var ids = tags.Split(new[] { ',' }).Select(Int32.Parse).ToArray();