mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Fixing Orchard.Rules conflicts with Workflows
--HG-- branch : 1.x
This commit is contained in:
@@ -2,6 +2,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using Orchard.Forms.Services;
|
||||
using Orchard.Rules.Models;
|
||||
using Orchard.Rules.Services;
|
||||
using Orchard.Rules.ViewModels;
|
||||
|
||||
@@ -2,8 +2,8 @@ Name: Rules
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardrules.codeplex.com
|
||||
Version: 1.6
|
||||
OrchardVersion: 1.4
|
||||
Version: 1.7
|
||||
OrchardVersion: 1.7
|
||||
Description: Provides a system de trigger actions based on events.
|
||||
Features:
|
||||
Orchard.Rules:
|
||||
|
||||
@@ -142,7 +142,6 @@
|
||||
<Compile Include="Providers\ScheduleActions.cs" />
|
||||
<Compile Include="Providers\NotificationForms.cs" />
|
||||
<Compile Include="Providers\NotificationActions.cs" />
|
||||
<Compile Include="Services\FormParametersHelper.cs" />
|
||||
<Compile Include="Services\RulesServices.cs" />
|
||||
<Compile Include="Services\IActionProvider.cs" />
|
||||
<Compile Include="Services\IEventProvider.cs" />
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Orchard.Rules.Services {
|
||||
public static class FormParametersHelper {
|
||||
public static string ToString(IDictionary<string, string> parameters) {
|
||||
var doc = new XDocument();
|
||||
doc.Add(new XElement("Form"));
|
||||
var root = doc.Root;
|
||||
|
||||
if (root == null) {
|
||||
return String.Empty;
|
||||
}
|
||||
|
||||
foreach (var entry in parameters) {
|
||||
root.Add(new XElement(XmlConvert.EncodeLocalName(entry.Key), entry.Value));
|
||||
}
|
||||
|
||||
return doc.ToString(SaveOptions.DisableFormatting);
|
||||
}
|
||||
|
||||
public static IDictionary<string, string> FromString(string parameters) {
|
||||
var result = new Dictionary<string, string>();
|
||||
|
||||
if (String.IsNullOrEmpty(parameters)) {
|
||||
return result;
|
||||
}
|
||||
|
||||
var doc = XDocument.Parse(parameters);
|
||||
if (doc.Root == null) {
|
||||
return result;
|
||||
}
|
||||
|
||||
foreach (var element in doc.Root.Elements()) {
|
||||
result.Add(element.Name.LocalName, element.Value);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Orchard.Forms.Services;
|
||||
using Orchard.Logging;
|
||||
using Orchard.Rules.Models;
|
||||
using Orchard.Data;
|
||||
|
||||
Reference in New Issue
Block a user