#18695: Allow import to accept any type of step

Work Item: 18695

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2012-06-22 09:53:54 -07:00
parent 9ee9cb3f04
commit 1688b2a3ce

View File

@@ -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);