Skip to content

Commit

Permalink
Fix the Umbraco Installer for < v7.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeavon committed Sep 7, 2016
1 parent 7a9d013 commit fc12391
Showing 1 changed file with 16 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Copyright (c) James Jackson-South, Jeavon Leopold, and contributors. All rights reserved.
// Licensed under the Apache License, Version 2.0.
// </copyright>

namespace Our.Umbraco.FileSystemProviders.Azure.Installer
{
using System;
Expand All @@ -10,6 +11,7 @@ namespace Our.Umbraco.FileSystemProviders.Azure.Installer
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.Hosting;
using System.Web.Http;
using System.Xml;
Expand Down Expand Up @@ -386,16 +388,21 @@ private static bool ExecuteWebConfigTransform()

private static bool ExecuteMediaWebConfigTransform()
{
XmlNode transFormConfigAction =
helper.parseStringToXmlNode("<Action runat=\"install\" "
+ "undo=\"true\" "
+ "alias=\"UmbracoFileSystemProviders.Azure.TransformConfig\" "
+ "file=\"~/Media/web.config\" "
+ "xdtfile=\"~/app_plugins/UmbracoFileSystemProviders/Azure/install/media-web.config\">"
+ "</Action>").FirstChild;
if (File.Exists(HttpContext.Current.Server.MapPath("~/Media/web.config")))
{
XmlNode transFormConfigAction =
helper.parseStringToXmlNode("<Action runat=\"install\" "
+ "undo=\"true\" "
+ "alias=\"UmbracoFileSystemProviders.Azure.TransformConfig\" "
+ "file=\"~/Media/web.config\" "
+ "xdtfile=\"~/app_plugins/UmbracoFileSystemProviders/Azure/install/media-web.config\">"
+ "</Action>").FirstChild;

PackageActions.TransformConfig transformConfig = new PackageActions.TransformConfig();
return transformConfig.Execute("UmbracoFileSystemProviders.Azure", transFormConfigAction);
}

PackageActions.TransformConfig transformConfig = new PackageActions.TransformConfig();
return transformConfig.Execute("UmbracoFileSystemProviders.Azure", transFormConfigAction);
return true;
}

private static bool ExecuteImageProcessorSecurityConfigTransform()
Expand Down

0 comments on commit fc12391

Please sign in to comment.