Removes default instructions from the installer service, passing in empty instructions is ok now and the server will assign defaults if they are empty.

This commit is contained in:
Shannon
2014-03-05 12:08:35 +11:00
parent 7f7f3202d2
commit ce068a60d5
7 changed files with 27 additions and 19 deletions

View File

@@ -130,13 +130,9 @@ namespace Umbraco.Web.Install.Controllers
var step = InstallHelper.GetAllSteps().Single(x => x.Name == stepStatus.Name);
JToken instruction = null;
if (step.HasUIElement)
//If this step has any instructions then extract them
if (installModel.Instructions.Any(x => x.Key == step.Name))
{
//Since this is a UI instruction, we will extract the model from it
if (installModel.Instructions.Any(x => x.Key == step.Name) == false)
{
throw new HttpResponseException(Request.CreateValidationErrorResponse("No instruction defined for step: " + step.Name));
}
instruction = installModel.Instructions[step.Name];
}

View File

@@ -54,13 +54,7 @@ namespace Umbraco.Web.Install.Controllers
case ValidateRequestAttempt.FailedNoContextId:
return Redirect(SystemDirectories.Umbraco + "/AuthorizeUpgrade?redir=" + Server.UrlEncode(Request.RawUrl));
}
}
//get a package GUID
var r = new org.umbraco.our.Repository();
var modules = r.Modules();
var defaultPackageId = modules.First().RepoGuid;
ViewBag.DefaultPackageId = defaultPackageId;
}
//gen the install base url
ViewBag.InstallApiBaseUrl = Url.GetUmbracoApiService("GetSetup", "InstallApi", "install").TrimEnd("GetSetup");