mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Cleaning filters
--HG-- branch : 1.x
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
@@ -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();
|
||||
|
||||
|
Reference in New Issue
Block a user