Improved TokensFilter.

Since null is an allowed value anyway.
This commit is contained in:
Sipke Schoorstra
2015-05-20 18:56:19 +02:00
parent f84361d231
commit 22b961f7d4
2 changed files with 2 additions and 5 deletions

View File

@@ -10,4 +10,4 @@ Features:
Name: Dashboards Name: Dashboards
Description: The Dashboards module enables administrators to customize the dashboard screen of the administration UI of the application. Description: The Dashboards module enables administrators to customize the dashboard screen of the administration UI of the application.
Category: Admin Category: Admin
Dependencies: Orchard.Layouts Dependencies: Orchard.Layouts, Orchard.Layouts.Tokens

View File

@@ -1,5 +1,4 @@
using System; using System;
using System.Collections.Generic;
using Orchard.Environment.Extensions; using Orchard.Environment.Extensions;
using Orchard.Services; using Orchard.Services;
using Orchard.Tokens; using Orchard.Tokens;
@@ -27,9 +26,7 @@ namespace Orchard.Layouts.Filters {
return text; return text;
} }
var data = new Dictionary<string, object>(); text = _tokenizer.Replace(text, null, new ReplaceOptions {Encoding = ReplaceOptions.NoEncode});
text = _tokenizer.Replace(text, data, new ReplaceOptions {Encoding = ReplaceOptions.NoEncode});
return text; return text;
} }