From 1688b2a3ce7dc498e2477afd1c44a94e7f6e7bd8 Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Fri, 22 Jun 2012 09:53:54 -0700 Subject: [PATCH] #18695: Allow import to accept any type of step Work Item: 18695 --HG-- branch : 1.x --- .../Services/ImportExportService.cs | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/Orchard.Web/Modules/Orchard.ImportExport/Services/ImportExportService.cs b/src/Orchard.Web/Modules/Orchard.ImportExport/Services/ImportExportService.cs index 7bbf092ca..43ec5dc8e 100644 --- a/src/Orchard.Web/Modules/Orchard.ImportExport/Services/ImportExportService.cs +++ b/src/Orchard.Web/Modules/Orchard.ImportExport/Services/ImportExportService.cs @@ -10,7 +10,6 @@ using Orchard.FileSystems.AppData; using Orchard.ImportExport.Models; using Orchard.Localization; using Orchard.Logging; -using Orchard.Recipes.Models; using Orchard.Recipes.Services; using VersionOptions = Orchard.ContentManagement.VersionOptions; @@ -50,7 +49,6 @@ namespace Orchard.ImportExport.Services { public void Import(string recipeText) { var recipe = _recipeParser.ParseRecipe(recipeText); - CheckRecipeSteps(recipe); _recipeManager.Execute(recipe); UpdateShell(); } @@ -180,19 +178,6 @@ namespace Orchard.ImportExport.Services { return _appDataFolder.MapPath(path); } - private void CheckRecipeSteps(Recipe recipe) { - foreach (var step in recipe.RecipeSteps) { - switch (step.Name) { - case "Metadata": - case "Settings": - case "Data": - break; - default: - throw new InvalidOperationException(T("Step {0} is not a supported import step.", step.Name).Text); - } - } - } - private void UpdateShell() { var descriptor = _shellDescriptorManager.GetShellDescriptor(); _shellDescriptorManager.UpdateShellDescriptor(descriptor.SerialNumber, descriptor.Features, descriptor.Parameters);