mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Added back ExportUtc element.
This commit is contained in:
@@ -1,8 +1,14 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Xml.Linq;
|
using System.Xml.Linq;
|
||||||
|
using Orchard.Services;
|
||||||
|
|
||||||
namespace Orchard.Recipes.Services {
|
namespace Orchard.Recipes.Services {
|
||||||
public class RecipeBuilder : Component, IRecipeBuilder {
|
public class RecipeBuilder : Component, IRecipeBuilder {
|
||||||
|
private readonly IClock _clock;
|
||||||
|
|
||||||
|
public RecipeBuilder(IClock clock) {
|
||||||
|
_clock = clock;
|
||||||
|
}
|
||||||
|
|
||||||
public XDocument Build(IEnumerable<IRecipeBuilderStep> steps) {
|
public XDocument Build(IEnumerable<IRecipeBuilderStep> steps) {
|
||||||
var context = new BuildContext {
|
var context = new BuildContext {
|
||||||
@@ -19,9 +25,10 @@ namespace Orchard.Recipes.Services {
|
|||||||
private XDocument CreateRecipeRoot() {
|
private XDocument CreateRecipeRoot() {
|
||||||
var recipeRoot = new XDocument(
|
var recipeRoot = new XDocument(
|
||||||
new XDeclaration("1.0", "", "yes"),
|
new XDeclaration("1.0", "", "yes"),
|
||||||
new XComment("Exported from Orchard"),
|
new XComment(T("Exported from Orchard").ToString()),
|
||||||
new XElement("Orchard",
|
new XElement("Orchard",
|
||||||
new XElement("Recipe")
|
new XElement("Recipe",
|
||||||
|
new XElement("ExportUtc", _clock.UtcNow))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
return recipeRoot;
|
return recipeRoot;
|
||||||
|
|||||||
Reference in New Issue
Block a user