diff --git a/umbraco/presentation/umbraco/developer/Packages/installedPackage.aspx.cs b/umbraco/presentation/umbraco/developer/Packages/installedPackage.aspx.cs
index 1b7adb8562..b47439c15d 100644
--- a/umbraco/presentation/umbraco/developer/Packages/installedPackage.aspx.cs
+++ b/umbraco/presentation/umbraco/developer/Packages/installedPackage.aspx.cs
@@ -17,6 +17,7 @@ using umbraco.cms.businesslogic.macro;
using runtimeMacro = umbraco.macro;
using System.Xml;
using umbraco.IO;
+using umbraco.cms.presentation.Trees;
namespace umbraco.presentation.developer.packages
{
@@ -564,6 +565,8 @@ namespace umbraco.presentation.developer.packages
ClientTools.ClearClientTreeCache()
.RefreshTree();
+ TreeDefinitionCollection.Instance.ReRegisterTrees();
+
}
private bool isManifestEmpty()
diff --git a/umbraco/presentation/umbraco/developer/Packages/installer.aspx.cs b/umbraco/presentation/umbraco/developer/Packages/installer.aspx.cs
index 7c5d883454..31b154947a 100644
--- a/umbraco/presentation/umbraco/developer/Packages/installer.aspx.cs
+++ b/umbraco/presentation/umbraco/developer/Packages/installer.aspx.cs
@@ -12,289 +12,291 @@ using System.Xml;
using System.Xml.XPath;
using umbraco.BasePages;
using umbraco.IO;
+using umbraco.cms.presentation.Trees;
namespace umbraco.presentation.developer.packages
{
- ///
" + ex.Message;
- }
+ protected void Page_Load(object sender, System.EventArgs e)
+ {
+ Exception ex = new Exception();
+ if (!cms.businesslogic.packager.Settings.HasFileAccess(ref ex))
+ {
+ fb.Style.Add("margin-top", "7px");
+ fb.type = uicontrols.Feedback.feedbacktype.error;
+ fb.Text = "" + ui.Text("errors", "filePermissionsError") + ":
" + ex.Message;
+ }
- if (!IsPostBack)
- {
- ButtonInstall.Attributes.Add("onClick", "jQuery(this).hide(); jQuery('#installingMessage').show();; return true;");
- ButtonLoadPackage.Attributes.Add("onClick", "jQuery(this).hide(); jQuery('#loadingbar').show();; return true;");
- }
+ if (!IsPostBack)
+ {
+ ButtonInstall.Attributes.Add("onClick", "jQuery(this).hide(); jQuery('#installingMessage').show();; return true;");
+ ButtonLoadPackage.Attributes.Add("onClick", "jQuery(this).hide(); jQuery('#loadingbar').show();; return true;");
+ }
- //if we are actually in the middle of installing something...
- if (!String.IsNullOrEmpty(helper.Request("installing"))) {
- hideAllPanes();
- pane_installing.Visible = true;
- processInstall(helper.Request("installing"));
+ //if we are actually in the middle of installing something...
+ if (!String.IsNullOrEmpty(helper.Request("installing")))
+ {
+ hideAllPanes();
+ pane_installing.Visible = true;
+ processInstall(helper.Request("installing"));
- } else if (!String.IsNullOrEmpty(helper.Request("guid")) && !String.IsNullOrEmpty(helper.Request("repoGuid")))
- {
- //we'll fetch the local information we have about our repo, to find out what webservice to query.
- repo = cms.businesslogic.packager.repositories.Repository.getByGuid(helper.Request("repoGuid"));
+ }
+ else if (!String.IsNullOrEmpty(helper.Request("guid")) && !String.IsNullOrEmpty(helper.Request("repoGuid")))
+ {
+ //we'll fetch the local information we have about our repo, to find out what webservice to query.
+ repo = cms.businesslogic.packager.repositories.Repository.getByGuid(helper.Request("repoGuid"));
- if (repo.HasConnection()) {
- //from the webservice we'll fetch some info about the package.
- cms.businesslogic.packager.repositories.Package pack = repo.Webservice.PackageByGuid(helper.Request("guid"));
+ if (repo.HasConnection())
+ {
+ //from the webservice we'll fetch some info about the package.
+ cms.businesslogic.packager.repositories.Package pack = repo.Webservice.PackageByGuid(helper.Request("guid"));
- //if the package is protected we will ask for the users credentials. (this happens every time they try to fetch anything)
- if (!pack.Protected) {
- //if it isn't then go straigt to the accept licens screen
- tempFile.Value = p.Import(repo.fetch(helper.Request("guid")));
- updateSettings();
+ //if the package is protected we will ask for the users credentials. (this happens every time they try to fetch anything)
+ if (!pack.Protected)
+ {
+ //if it isn't then go straigt to the accept licens screen
+ tempFile.Value = p.Import(repo.fetch(helper.Request("guid")));
+ updateSettings();
- } else if (!IsPostBack) {
+ }
+ else if (!IsPostBack)
+ {
- //Authenticate against the repo
- hideAllPanes();
- pane_authenticate.Visible = true;
+ //Authenticate against the repo
+ hideAllPanes();
+ pane_authenticate.Visible = true;
- }
- } else {
- fb.Style.Add("margin-top", "7px");
- fb.type = global::umbraco.uicontrols.Feedback.feedbacktype.error;
- fb.Text = "No connection to repository. Runway could not be installed as there was no connection to: '" + repo.RepositoryUrl + "'";
- pane_upload.Visible = false;
- }
- }
- }
+ }
+ }
+ else
+ {
+ fb.Style.Add("margin-top", "7px");
+ fb.type = global::umbraco.uicontrols.Feedback.feedbacktype.error;
+ fb.Text = "No connection to repository. Runway could not be installed as there was no connection to: '" + repo.RepositoryUrl + "'";
+ pane_upload.Visible = false;
+ }
+ }
+ }
- protected override void OnPreRender(EventArgs e)
- {
- base.OnPreRender(e);
- acceptCheckbox.Attributes.Add("onmouseup", "document.getElementById('" + ButtonInstall.ClientID + "').disabled = false;");
- }
+ protected override void OnPreRender(EventArgs e)
+ {
+ base.OnPreRender(e);
+ acceptCheckbox.Attributes.Add("onmouseup", "document.getElementById('" + ButtonInstall.ClientID + "').disabled = false;");
+ }
- #region Web Form Designer generated code
- override protected void OnInit(EventArgs e)
- {
- //
- // CODEGEN: This call is required by the ASP.NET Web Form Designer.
- //
- InitializeComponent();
- if (helper.Request("config") != "")
- {
- drawConfig();
- }
- base.OnInit(e);
- }
-
- ///
" + ex.ToString();
+ }
+ }
- }
- #endregion
+ //this fetches the protected package from the repo.
+ protected void fetchProtectedPackage(object sender, EventArgs e)
+ {
+ //we auth against the webservice. This key will be used to fetch the protected package.
+ string memberGuid = repo.Webservice.authenticate(tb_email.Text, library.md5(tb_password.Text));
- protected void uploadFile(object sender, System.EventArgs e)
- {
- try {
- tempFileName = Guid.NewGuid().ToString() + ".umb";
- string fileName = SystemDirectories.Data + System.IO.Path.DirectorySeparatorChar + tempFileName;
- file1.PostedFile.SaveAs(IOHelper.MapPath(fileName));
- tempFile.Value = p.Import(tempFileName);
- updateSettings();
- } catch (Exception ex) {
- fb.type = global::umbraco.uicontrols.Feedback.feedbacktype.error;
- fb.Text = "Could not upload file
" + ex.ToString();
- }
- }
+ //if we auth correctly and get a valid key back, we will fetch the file from the repo webservice.
+ if (!string.IsNullOrEmpty(memberGuid))
+ {
+ tempFile.Value = p.Import(repo.fetch(helper.Request("guid"), memberGuid));
+ updateSettings();
+ }
+ }
- //this fetches the protected package from the repo.
- protected void fetchProtectedPackage(object sender, EventArgs e) {
- //we auth against the webservice. This key will be used to fetch the protected package.
- string memberGuid = repo.Webservice.authenticate(tb_email.Text, library.md5(tb_password.Text));
-
- //if we auth correctly and get a valid key back, we will fetch the file from the repo webservice.
- if(!string.IsNullOrEmpty(memberGuid)){
- tempFile.Value = p.Import(repo.fetch(helper.Request("guid"), memberGuid));
- updateSettings();
- }
- }
-
- //this loads the accept license screen
- private void updateSettings()
- {
- hideAllPanes();
+ //this loads the accept license screen
+ private void updateSettings()
+ {
+ hideAllPanes();
- pane_acceptLicense.Visible = true;
- pane_acceptLicenseInner.Text = "Installing the package: " + p.Name;
- Panel1.Text = "Installing the package: " + p.Name;
+ pane_acceptLicense.Visible = true;
+ pane_acceptLicenseInner.Text = "Installing the package: " + p.Name;
+ Panel1.Text = "Installing the package: " + p.Name;
- if (p.ContainsUnsecureFiles && repo == null)
- {
- pp_unsecureFiles.Visible = true;
- foreach (string str in p.UnsecureFiles)
- {
- lt_files.Text += "