-
-
-
- <%--
- No thanks, do not install a starterkit!
- --%>
-
-
-
-
-
-
">
-
-
-
Oops...the installer can't connect to the repository
- Starter Kits could not be fetched from the repository as there was no connection - which can occur if you are using a proxy server or firewall with certain configurations,
- or if you are not currently connected to the internet.
-
- Click Continue to complete the installation then navigate to the Developer section of your Umbraco installation
- where you will find the Starter Kits listed in the Packages tree.
-
-
-
-
-
-
-
-
-
-
-
Oops...the installer encountered an error
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/umbraco/developer/Packages/editPackage.aspx b/src/Umbraco.Web.UI/umbraco/developer/Packages/editPackage.aspx
index 87faed4e43..edd484c82e 100644
--- a/src/Umbraco.Web.UI/umbraco/developer/Packages/editPackage.aspx
+++ b/src/Umbraco.Web.UI/umbraco/developer/Packages/editPackage.aspx
@@ -39,7 +39,6 @@
-
diff --git a/src/Umbraco.Web/Editors/PackageInstallController.cs b/src/Umbraco.Web/Editors/PackageInstallController.cs
index d982d703cc..c980a06521 100644
--- a/src/Umbraco.Web/Editors/PackageInstallController.cs
+++ b/src/Umbraco.Web/Editors/PackageInstallController.cs
@@ -185,7 +185,7 @@ namespace Umbraco.Web.Editors
var actionsXml = new XmlDocument();
actionsXml.LoadXml("" + pack.Data.Actions + "");
- LogHelper.Debug("executing undo actions: {0}", () => actionsXml.OuterXml);
+ LogHelper.Debug("executing undo actions: {0}", () => actionsXml.OuterXml);
foreach (XmlNode n in actionsXml.DocumentElement.SelectNodes("//Action"))
{
@@ -196,13 +196,13 @@ namespace Umbraco.Web.Editors
}
catch (Exception ex)
{
- LogHelper.Error("An error occurred running undo actions", ex);
+ LogHelper.Error("An error occurred running undo actions", ex);
}
}
}
catch (Exception ex)
{
- LogHelper.Error("An error occurred running undo actions", ex);
+ LogHelper.Error("An error occurred running undo actions", ex);
}
}
@@ -471,11 +471,7 @@ namespace Umbraco.Web.Editors
string path = Path.Combine("packages", packageGuid + ".umb");
if (File.Exists(IOHelper.MapPath(Path.Combine(SystemDirectories.Data, path))) == false)
{
- //our repo guid
- using (var our = Repository.getByGuid("65194810-1f85-11dd-bd0b-0800200c9a66"))
- {
- path = our.GetPackageFile(packageGuid, Security.CurrentUser.Id, UmbracoVersion.Current);
- }
+ path = Services.PackagingService.FetchPackageFile(Guid.Parse(packageGuid), UmbracoVersion.Current, Security.GetUserId());
}
var model = new LocalPackageInstallModel
diff --git a/src/Umbraco.Web/Install/Controllers/InstallPackageController.cs b/src/Umbraco.Web/Install/Controllers/InstallPackageController.cs
index fc4a8962b8..e73302dc02 100644
--- a/src/Umbraco.Web/Install/Controllers/InstallPackageController.cs
+++ b/src/Umbraco.Web/Install/Controllers/InstallPackageController.cs
@@ -8,6 +8,7 @@ using System.Web.Http;
using Newtonsoft.Json.Linq;
using umbraco;
using Umbraco.Core;
+using Umbraco.Core.Configuration;
using Umbraco.Web.Install.Models;
using Umbraco.Web.WebApi;
@@ -57,23 +58,15 @@ namespace Umbraco.Web.Install.Controllers
///
[HttpPost]
public HttpResponseMessage DownloadPackageFiles(InstallPackageModel model)
- {
- var repo = global::umbraco.cms.businesslogic.packager.repositories.Repository.getByGuid(RepoGuid);
- if (repo == null)
- {
- return Json(
- new {success = false, error = "No repository found with id " + RepoGuid},
- HttpStatusCode.OK);
- }
- if (repo.HasConnection() == false)
- {
- return Json(
- new { success = false, error = "cannot_connect" },
- HttpStatusCode.OK);
- }
- var installer = new global::umbraco.cms.businesslogic.packager.Installer(UmbracoContext.Current.Security.CurrentUser.Id);
+ {
+ var packageFile = _applicationContext.Services.PackagingService.FetchPackageFile(
+ model.KitGuid,
+ UmbracoVersion.Current,
+ UmbracoContext.Current.Security.CurrentUser.Id);
- var tempFile = installer.Import(repo.fetch(model.KitGuid.ToString(), UmbracoContext.Current.Security.CurrentUser.Id));
+ var installer = new global::umbraco.cms.businesslogic.packager.Installer(UmbracoContext.Current.Security.CurrentUser.Id);
+
+ var tempFile = installer.Import(packageFile);
installer.LoadConfig(tempFile);
var pId = installer.CreateManifest(tempFile, model.KitGuid.ToString(), RepoGuid);
return Json(new
diff --git a/src/Umbraco.Web/Install/InstallHelper.cs b/src/Umbraco.Web/Install/InstallHelper.cs
index de101394c1..8bc21a2334 100644
--- a/src/Umbraco.Web/Install/InstallHelper.cs
+++ b/src/Umbraco.Web/Install/InstallHelper.cs
@@ -50,7 +50,7 @@ namespace Umbraco.Web.Install
new DatabaseConfigureStep(_umbContext.Application),
new DatabaseInstallStep(_umbContext.Application),
new DatabaseUpgradeStep(_umbContext.Application),
- new StarterKitDownloadStep(_umbContext.Application),
+ new StarterKitDownloadStep(_umbContext.Application, _umbContext.Security),
new StarterKitInstallStep(_umbContext.Application, _umbContext.HttpContext),
new StarterKitCleanupStep(_umbContext.Application),
new SetUmbracoVersionStep(_umbContext.Application, _umbContext.HttpContext),
diff --git a/src/Umbraco.Web/Install/InstallSteps/StarterKitDownloadStep.cs b/src/Umbraco.Web/Install/InstallSteps/StarterKitDownloadStep.cs
index e8397136a9..a8f55d3b2c 100644
--- a/src/Umbraco.Web/Install/InstallSteps/StarterKitDownloadStep.cs
+++ b/src/Umbraco.Web/Install/InstallSteps/StarterKitDownloadStep.cs
@@ -4,7 +4,9 @@ using System.Linq;
using System.Web;
using umbraco.cms.businesslogic.packager;
using Umbraco.Core;
+using Umbraco.Core.Configuration;
using Umbraco.Web.Install.Models;
+using Umbraco.Web.Security;
namespace Umbraco.Web.Install.InstallSteps
{
@@ -13,10 +15,12 @@ namespace Umbraco.Web.Install.InstallSteps
internal class StarterKitDownloadStep : InstallSetupStep
{
private readonly ApplicationContext _applicationContext;
+ private readonly WebSecurity _security;
- public StarterKitDownloadStep(ApplicationContext applicationContext)
+ public StarterKitDownloadStep(ApplicationContext applicationContext, WebSecurity security)
{
_applicationContext = applicationContext;
+ _security = security;
}
private const string RepoGuid = "65194810-1f85-11dd-bd0b-0800200c9a66";
@@ -50,19 +54,13 @@ namespace Umbraco.Web.Install.InstallSteps
}
private Tuple DownloadPackageFiles(Guid kitGuid)
- {
- var repo = global::umbraco.cms.businesslogic.packager.repositories.Repository.getByGuid(RepoGuid);
- if (repo == null)
- {
- throw new InstallException("No repository found with id " + RepoGuid);
- }
- if (repo.HasConnection() == false)
- {
- throw new InstallException("Cannot connect to repository");
- }
+ {
var installer = new Installer();
- var tempFile = installer.Import(repo.fetch(kitGuid.ToString()));
+ //Go get the package file from the package repo
+ var packageFile = _applicationContext.Services.PackagingService.FetchPackageFile(kitGuid, UmbracoVersion.Current, _security.GetUserId());
+
+ var tempFile = installer.Import(packageFile);
installer.LoadConfig(tempFile);
var pId = installer.CreateManifest(tempFile, kitGuid.ToString(), RepoGuid);
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/editPackage.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/editPackage.aspx
index bd34c32478..270e58fd19 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/editPackage.aspx
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/editPackage.aspx
@@ -36,7 +36,6 @@
ControlToValidate="packageVersion">*
-
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/editPackage.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/editPackage.aspx.cs
index 091996f7f0..1bd3918ec2 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/editPackage.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/editPackage.aspx.cs
@@ -48,16 +48,10 @@ namespace umbraco.presentation.developer.packages
cp = new ContentPicker();
content.Controls.Add(cp);
-
- bt_submitButton.Attributes.Add("onClick", "window.location = 'submitpackage.aspx?id=" + pack.Id.ToString() + "'; return false;");
-
+
if (string.IsNullOrEmpty(pack.PackagePath) == false)
{
- packageUmbFile.Text = " Download";
-
- if (cms.businesslogic.packager.repositories.Repository.getAll().Count > 0)
- bt_submitButton.Visible = true;
-
+ packageUmbFile.Text = " Download";
}
else
{
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/editPackage.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/editPackage.aspx.designer.cs
index a4c21695a7..dfd3eaa5d7 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/editPackage.aspx.designer.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/editPackage.aspx.designer.cs
@@ -47,6 +47,7 @@ namespace umbraco.presentation.developer.packages {
protected global::System.Web.UI.WebControls.RegularExpressionValidator VersionValidator;
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator7;
+
///
/// packageName control.
///
@@ -128,15 +129,6 @@ namespace umbraco.presentation.developer.packages {
///
protected global::umbraco.uicontrols.PropertyPanel pp_file;
- ///
- /// bt_submitButton control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Button bt_submitButton;
-
///
/// packageUmbFile control.
///
diff --git a/src/umbraco.cms/businesslogic/Packager/Repositories/Repository.cs b/src/umbraco.cms/businesslogic/Packager/Repositories/Repository.cs
index 6faf9d519a..28cc814a02 100644
--- a/src/umbraco.cms/businesslogic/Packager/Repositories/Repository.cs
+++ b/src/umbraco.cms/businesslogic/Packager/Repositories/Repository.cs
@@ -12,7 +12,8 @@ using Umbraco.Core.Logging;
using Umbraco.Core.IO;
namespace umbraco.cms.businesslogic.packager.repositories
-{
+{
+ [Obsolete("This should not be used and will be removed in future Umbraco versions")]
public class Repository : DisposableObject
{
public string Guid { get; private set; }