diff --git a/src/Umbraco.Core/IO/IOHelper.cs b/src/Umbraco.Core/IO/IOHelper.cs index 34be23e1f1..bc860705a2 100644 --- a/src/Umbraco.Core/IO/IOHelper.cs +++ b/src/Umbraco.Core/IO/IOHelper.cs @@ -249,6 +249,32 @@ namespace Umbraco.Core.IO return _rootDir; } + internal static string GetRootDirectoryBinFolder() + { + string binFolder = string.Empty; + if (string.IsNullOrEmpty(_rootDir)) + { + binFolder = Assembly.GetExecutingAssembly().GetAssemblyFile().Directory.FullName; + return binFolder; + } + + binFolder = Path.Combine(GetRootDirectorySafe(), "bin"); + +#if DEBUG + var debugFolder = Path.Combine(binFolder, "debug"); + if (Directory.Exists(debugFolder)) + return debugFolder; +#endif + var releaseFolder = Path.Combine(binFolder, "release"); + if (Directory.Exists(releaseFolder)) + return releaseFolder; + + if (Directory.Exists(binFolder)) + return binFolder; + + return _rootDir; + } + /// /// Allows you to overwrite RootDirectory, which would otherwise be resolved /// automatically upon application start. diff --git a/src/Umbraco.Core/Persistence/Repositories/ContentTypeBaseRepository.cs b/src/Umbraco.Core/Persistence/Repositories/ContentTypeBaseRepository.cs index 7fa04e6e58..e4299bbced 100644 --- a/src/Umbraco.Core/Persistence/Repositories/ContentTypeBaseRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/ContentTypeBaseRepository.cs @@ -321,7 +321,7 @@ namespace Umbraco.Core.Persistence.Repositories sql.Select("*") .From() .LeftJoin() - .On(left => left.Id, right => right.NodeId) + .On(left => left.AllowedId, right => right.NodeId) .Where(x => x.Id == id); var allowedContentTypeDtos = Database.Fetch(sql); diff --git a/src/Umbraco.Core/Standalone/ServiceContextManager.cs b/src/Umbraco.Core/Standalone/ServiceContextManager.cs index 29a2945edd..ea9464242b 100644 --- a/src/Umbraco.Core/Standalone/ServiceContextManager.cs +++ b/src/Umbraco.Core/Standalone/ServiceContextManager.cs @@ -1,4 +1,6 @@ using System; +using System.Diagnostics; +using System.Reflection; using Umbraco.Core.Persistence; using Umbraco.Core.Persistence.Mappers; using Umbraco.Core.Persistence.UnitOfWork; @@ -14,12 +16,18 @@ namespace Umbraco.Core.Standalone private ServiceContext _serviceContext; private readonly StandaloneCoreApplication _application; - public ServiceContextManager(string connectionString, string providerName) + public ServiceContextManager(string connectionString, string providerName, string baseDirectory) { _connectionString = connectionString; _providerName = providerName; - _application = StandaloneCoreApplication.GetApplication(); + Trace.WriteLine("ServiceContextManager-Current AppDomain: " + AppDomain.CurrentDomain.FriendlyName); + Trace.WriteLine("ServiceContextManager-Current AppDomain: " + AppDomain.CurrentDomain.BaseDirectory); + + var examineEventHandlerToRemove = Type.GetType("Umbraco.Web.Search.ExamineEvents, Umbraco.Web"); + + _application = StandaloneCoreApplication.GetApplication(baseDirectory); + _application.WithoutApplicationEventHandler(examineEventHandlerToRemove); _application.Start(); } diff --git a/src/Umbraco.Core/Standalone/StandaloneCoreApplication.cs b/src/Umbraco.Core/Standalone/StandaloneCoreApplication.cs index 0e0081d948..c22a648478 100644 --- a/src/Umbraco.Core/Standalone/StandaloneCoreApplication.cs +++ b/src/Umbraco.Core/Standalone/StandaloneCoreApplication.cs @@ -8,7 +8,10 @@ namespace Umbraco.Core.Standalone /// /// Initializes a new instance of the class. /// - protected StandaloneCoreApplication() { } + protected StandaloneCoreApplication(string baseDirectory) + { + _baseDirectory = baseDirectory; + } /// /// Provides the application boot manager. @@ -16,11 +19,12 @@ namespace Umbraco.Core.Standalone /// An application boot manager. protected override IBootManager GetBootManager() { - return new StandaloneCoreBootManager(this, _handlersToAdd, _handlersToRemove); + return new StandaloneCoreBootManager(this, _handlersToAdd, _handlersToRemove, _baseDirectory); } #region Application + private readonly string _baseDirectory; private static StandaloneCoreApplication _application; private static bool _started; private static readonly object AppLock = new object(); @@ -28,11 +32,11 @@ namespace Umbraco.Core.Standalone /// /// Gets the instance of the standalone Umbraco application. /// - public static StandaloneCoreApplication GetApplication() + public static StandaloneCoreApplication GetApplication(string baseDirectory) { lock (AppLock) { - return _application ?? (_application = new StandaloneCoreApplication()); + return _application ?? (_application = new StandaloneCoreApplication(baseDirectory)); } } diff --git a/src/Umbraco.Core/Standalone/StandaloneCoreBootManager.cs b/src/Umbraco.Core/Standalone/StandaloneCoreBootManager.cs index 46871e2055..84c73f95b7 100644 --- a/src/Umbraco.Core/Standalone/StandaloneCoreBootManager.cs +++ b/src/Umbraco.Core/Standalone/StandaloneCoreBootManager.cs @@ -10,12 +10,16 @@ namespace Umbraco.Core.Standalone { private readonly IEnumerable _handlersToAdd; private readonly IEnumerable _handlersToRemove; + private readonly string _baseDirectory; - public StandaloneCoreBootManager(UmbracoApplicationBase umbracoApplication, IEnumerable handlersToAdd, IEnumerable handlersToRemove) + public StandaloneCoreBootManager(UmbracoApplicationBase umbracoApplication, IEnumerable handlersToAdd, IEnumerable handlersToRemove, string baseDirectory) : base(umbracoApplication) { _handlersToAdd = handlersToAdd; _handlersToRemove = handlersToRemove; + _baseDirectory = baseDirectory; + + base.InitializeApplicationRootPath(_baseDirectory); // this is only here to ensure references to the assemblies needed for // the DataTypesResolver otherwise they won't be loaded into the AppDomain. @@ -25,8 +29,10 @@ namespace Umbraco.Core.Standalone protected override void InitializeApplicationEventsResolver() { base.InitializeApplicationEventsResolver(); + foreach (var type in _handlersToAdd) ApplicationEventsResolver.Current.AddType(type); + foreach (var type in _handlersToRemove) ApplicationEventsResolver.Current.RemoveType(type); } @@ -36,7 +42,7 @@ namespace Umbraco.Core.Standalone base.InitializeResolvers(); //Mappers are not resolved, which could be because of a known TypeMapper issue - MappingResolver.Reset(); + /*MappingResolver.Reset(); MappingResolver.Current = new MappingResolver( () => new List @@ -47,7 +53,7 @@ namespace Umbraco.Core.Standalone typeof (MediaTypeMapper), typeof (DataTypeDefinitionMapper), typeof (UmbracoEntityMapper) - }); + });*/ } } } \ No newline at end of file diff --git a/src/Umbraco.Core/TypeFinder.cs b/src/Umbraco.Core/TypeFinder.cs index f3345ca01b..f74d7099d1 100644 --- a/src/Umbraco.Core/TypeFinder.cs +++ b/src/Umbraco.Core/TypeFinder.cs @@ -73,8 +73,10 @@ namespace Umbraco.Core { //NOTE: we cannot use AppDomain.CurrentDomain.GetAssemblies() because this only returns assemblies that have // already been loaded in to the app domain, instead we will look directly into the bin folder and load each one. - var binFolder = Assembly.GetExecutingAssembly().GetAssemblyFile().Directory; - var binAssemblyFiles = Directory.GetFiles(binFolder.FullName, "*.dll", SearchOption.TopDirectoryOnly).ToList(); + var binFolder = IOHelper.GetRootDirectoryBinFolder(); + var binAssemblyFiles = Directory.GetFiles(binFolder, "*.dll", SearchOption.TopDirectoryOnly).ToList(); + //var binFolder = Assembly.GetExecutingAssembly().GetAssemblyFile().Directory; + //var binAssemblyFiles = Directory.GetFiles(binFolder.FullName, "*.dll", SearchOption.TopDirectoryOnly).ToList(); assemblies = new List(); foreach (var a in binAssemblyFiles) { diff --git a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml index 69824636d8..b24a83de35 100644 --- a/src/Umbraco.Web.UI/umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/umbraco/config/lang/en.xml @@ -639,6 +639,7 @@ To manage your website, simply open the umbraco back office and start adding con Upgrade instructions There's an upgrade available for this package. You can download it directly from the umbraco package repository. Package version + Package version history View package website diff --git a/src/Umbraco.Web.UI/umbraco/developer/Packages/installedPackage.aspx b/src/Umbraco.Web.UI/umbraco/developer/Packages/installedPackage.aspx index b1c2d9c8ec..d624d4c7f9 100644 --- a/src/Umbraco.Web.UI/umbraco/developer/Packages/installedPackage.aspx +++ b/src/Umbraco.Web.UI/umbraco/developer/Packages/installedPackage.aspx @@ -56,7 +56,17 @@ - + + + + + + + + +
diff --git a/src/Umbraco.Web.UI/umbraco/settings/stylesheet/editstylesheet.aspx b/src/Umbraco.Web.UI/umbraco/settings/stylesheet/editstylesheet.aspx index e380ac0c17..5ed8dd435e 100644 --- a/src/Umbraco.Web.UI/umbraco/settings/stylesheet/editstylesheet.aspx +++ b/src/Umbraco.Web.UI/umbraco/settings/stylesheet/editstylesheet.aspx @@ -25,10 +25,11 @@ } }); editor.init(); - }); //bind save shortcut UmbClientMgr.appActions().bindSaveShortCut(); + }); + })(jQuery); diff --git a/src/Umbraco.Web.UI/umbraco_client/FolderBrowser/Js/folderbrowser.js b/src/Umbraco.Web.UI/umbraco_client/FolderBrowser/Js/folderbrowser.js index a8132ae7c7..438a04344a 100644 --- a/src/Umbraco.Web.UI/umbraco_client/FolderBrowser/Js/folderbrowser.js +++ b/src/Umbraco.Web.UI/umbraco_client/FolderBrowser/Js/folderbrowser.js @@ -178,7 +178,7 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls"); var overlay = $("
" + "
" + instructions + - "
" + + "" + "" + "" + "" + diff --git a/src/Umbraco.Web.UI/web.Template.config b/src/Umbraco.Web.UI/web.Template.config index 924381560b..5438ea097b 100644 --- a/src/Umbraco.Web.UI/web.Template.config +++ b/src/Umbraco.Web.UI/web.Template.config @@ -167,13 +167,6 @@ - - - - - - - @@ -290,4 +283,4 @@ - \ No newline at end of file + diff --git a/src/Umbraco.Web/Cache/CacheRefresherEventHandler.cs b/src/Umbraco.Web/Cache/CacheRefresherEventHandler.cs index 0f529b8840..435fb9c7ef 100644 --- a/src/Umbraco.Web/Cache/CacheRefresherEventHandler.cs +++ b/src/Umbraco.Web/Cache/CacheRefresherEventHandler.cs @@ -402,7 +402,7 @@ namespace Umbraco.Web.Cache { DistributedCache.Instance.RefreshUserCache(sender.UserId); } - if (sender.Nodes.Any()) + if (sender.NodeIds.Any()) { DistributedCache.Instance.RefreshAllUserCache(); } diff --git a/src/Umbraco.Web/Mvc/AreaRegistrationExtensions.cs b/src/Umbraco.Web/Mvc/AreaRegistrationExtensions.cs index 98a845a2f0..833fe92906 100644 --- a/src/Umbraco.Web/Mvc/AreaRegistrationExtensions.cs +++ b/src/Umbraco.Web/Mvc/AreaRegistrationExtensions.cs @@ -90,12 +90,14 @@ namespace Umbraco.Web.Mvc controllerPluginRoute.DataTokens.Add("UseNamespaceFallback", false); //constraints: only match controllers ending with 'controllerSuffixName' and only match this controller's ID for this route + if (controllerSuffixName.IsNullOrWhiteSpace() == false) + { controllerPluginRoute.Constraints = new RouteValueDictionary( new Dictionary { {"controller", @"(\w+)" + controllerSuffixName} }); - + } //match this area controllerPluginRoute.DataTokens.Add("area", area.AreaName); diff --git a/src/Umbraco.Web/Mvc/BackOfficeArea.cs b/src/Umbraco.Web/Mvc/BackOfficeArea.cs index 8dc1e9727e..b91cbba9b2 100644 --- a/src/Umbraco.Web/Mvc/BackOfficeArea.cs +++ b/src/Umbraco.Web/Mvc/BackOfficeArea.cs @@ -1,4 +1,4 @@ -using System.Web.Mvc; +using System.Web.Mvc; using Umbraco.Core.Configuration; using Umbraco.Web.Editors; using Umbraco.Web.Install; diff --git a/src/Umbraco.Web/Mvc/FilteredControllerFactoriesResolver.cs b/src/Umbraco.Web/Mvc/FilteredControllerFactoriesResolver.cs index c6c0e5d109..e4fadf7c4b 100644 --- a/src/Umbraco.Web/Mvc/FilteredControllerFactoriesResolver.cs +++ b/src/Umbraco.Web/Mvc/FilteredControllerFactoriesResolver.cs @@ -7,7 +7,7 @@ namespace Umbraco.Web.Mvc /// /// A resolver for storing IFilteredControllerFactories /// - internal sealed class FilteredControllerFactoriesResolver : ManyObjectsResolverBase + public sealed class FilteredControllerFactoriesResolver : ManyObjectsResolverBase { /// /// Constructor diff --git a/src/Umbraco.Web/Mvc/RenderMvcController.cs b/src/Umbraco.Web/Mvc/RenderMvcController.cs index 0f26610070..4615937e6b 100644 --- a/src/Umbraco.Web/Mvc/RenderMvcController.cs +++ b/src/Umbraco.Web/Mvc/RenderMvcController.cs @@ -73,13 +73,13 @@ namespace Umbraco.Web.Mvc /// protected bool EnsurePhsyicalViewExists(string template) { - if (!System.IO.File.Exists( - Path.Combine(Server.MapPath(Constants.ViewLocation), template + ".cshtml"))) - { - LogHelper.Warn("No physical template file was found for template " + template); - return false; - } - return true; + var result = ViewEngines.Engines.FindView(ControllerContext, template, null); + if(result.View == null) + { + LogHelper.Warn("No physical template file was found for template " + template); + return false; + } + return true; } /// diff --git a/src/Umbraco.Web/Standalone/ServiceContextManager.cs b/src/Umbraco.Web/Standalone/ServiceContextManager.cs index badd77d21b..aa53b586ee 100644 --- a/src/Umbraco.Web/Standalone/ServiceContextManager.cs +++ b/src/Umbraco.Web/Standalone/ServiceContextManager.cs @@ -1,4 +1,5 @@ using System; +using System.Diagnostics; using Umbraco.Core; using Umbraco.Core.Persistence; using Umbraco.Core.Persistence.Mappers; @@ -15,12 +16,15 @@ namespace Umbraco.Web.Standalone private ServiceContext _serviceContext; private readonly StandaloneApplication _application; - public ServiceContextManager(string connectionString, string providerName) + public ServiceContextManager(string connectionString, string providerName, string baseDirectory) { _connectionString = connectionString; _providerName = providerName; - _application = StandaloneApplication.GetApplication(); + Trace.WriteLine("Current AppDomain: " + AppDomain.CurrentDomain.FriendlyName); + Trace.WriteLine("Current AppDomain: " + AppDomain.CurrentDomain.BaseDirectory); + + _application = StandaloneApplication.GetApplication(baseDirectory); _application.Start(); } diff --git a/src/Umbraco.Web/Standalone/StandaloneApplication.cs b/src/Umbraco.Web/Standalone/StandaloneApplication.cs index a1fd0249a7..cdaf8718c1 100644 --- a/src/Umbraco.Web/Standalone/StandaloneApplication.cs +++ b/src/Umbraco.Web/Standalone/StandaloneApplication.cs @@ -14,7 +14,10 @@ namespace Umbraco.Web.Standalone /// /// Initializes a new instance of the class. /// - protected StandaloneApplication(){ } + protected StandaloneApplication(string baseDirectory) + { + _baseDirectory = baseDirectory; + } /// /// Provides the application boot manager. @@ -22,23 +25,24 @@ namespace Umbraco.Web.Standalone /// An application boot manager. protected override IBootManager GetBootManager() { - return new StandaloneBootManager(this, _handlersToAdd, _handlersToRemove); + return new StandaloneBootManager(this, _handlersToAdd, _handlersToRemove, _baseDirectory); } #region Application private static StandaloneApplication _application; + private readonly string _baseDirectory; private static bool _started; private static readonly object AppLock = new object(); /// /// Gets the instance of the standalone Umbraco application. /// - public static StandaloneApplication GetApplication() + public static StandaloneApplication GetApplication(string baseDirectory) { lock (AppLock) { - return _application ?? (_application = new StandaloneApplication()); + return _application ?? (_application = new StandaloneApplication(baseDirectory)); } } diff --git a/src/Umbraco.Web/Standalone/StandaloneBootManager.cs b/src/Umbraco.Web/Standalone/StandaloneBootManager.cs index 1215ab89a7..cf2e8f7c11 100644 --- a/src/Umbraco.Web/Standalone/StandaloneBootManager.cs +++ b/src/Umbraco.Web/Standalone/StandaloneBootManager.cs @@ -20,12 +20,16 @@ namespace Umbraco.Web.Standalone private readonly IEnumerable _handlersToAdd; private readonly IEnumerable _handlersToRemove; + private readonly string _baseDirectory; - public StandaloneBootManager(UmbracoApplicationBase umbracoApplication, IEnumerable handlersToAdd, IEnumerable handlersToRemove) + public StandaloneBootManager(UmbracoApplicationBase umbracoApplication, IEnumerable handlersToAdd, IEnumerable handlersToRemove, string baseDirectory) : base(umbracoApplication) { _handlersToAdd = handlersToAdd; _handlersToRemove = handlersToRemove; + _baseDirectory = baseDirectory; + + base.InitializeApplicationRootPath(_baseDirectory); // this is only here to ensure references to the assemblies needed for // the DataTypesResolver otherwise they won't be loaded into the AppDomain. @@ -63,7 +67,7 @@ namespace Umbraco.Web.Standalone typeof (ContentFinderByPageIdQuery), typeof (ContentFinderByNiceUrl), typeof (ContentFinderByIdPath), - typeof(ContentFinderByNotFoundHandlers) + typeof (ContentFinderByNotFoundHandlers) ); // fixme - what else? diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 6bb0648c49..cd7fae9060 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -404,6 +404,7 @@ + diff --git a/src/Umbraco.Web/WebBootManager.cs b/src/Umbraco.Web/WebBootManager.cs index 6a1e778f67..becdc4312c 100644 --- a/src/Umbraco.Web/WebBootManager.cs +++ b/src/Umbraco.Web/WebBootManager.cs @@ -40,10 +40,10 @@ namespace Umbraco.Web { private readonly bool _isForTesting; - public WebBootManager(UmbracoApplicationBase umbracoApplication) + public WebBootManager(UmbracoApplicationBase umbracoApplication) : this(umbracoApplication, false) { - + } /// @@ -51,10 +51,10 @@ namespace Umbraco.Web /// /// /// - internal WebBootManager(UmbracoApplicationBase umbracoApplication, bool isForTesting) + internal WebBootManager(UmbracoApplicationBase umbracoApplication, bool isForTesting) : base(umbracoApplication) { - _isForTesting = isForTesting; + _isForTesting = isForTesting; } /// @@ -62,7 +62,7 @@ namespace Umbraco.Web /// /// public override IBootManager Initialize() - { + { base.Initialize(); // Backwards compatibility - set the path and URL type for ClientDependency 1.5.1 [LK] @@ -221,7 +221,6 @@ namespace Umbraco.Web route.DataTokens.Add("UseNamespaceFallback", false); //Don't look anywhere else except this namespace! route.DataTokens.Add("umbraco", "api"); //ensure the umbraco token is set } - private void RouteLocalSurfaceController(Type controller, string umbracoPath) { var meta = PluginController.GetMetadata(controller); diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadPackages.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadPackages.cs index 7d19a48e8b..cbdc3f0a90 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadPackages.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadPackages.cs @@ -1,29 +1,14 @@ using System; -using System.Collections; using System.Collections.Generic; -using System.Data; -using System.IO; +using System.Linq; using System.Text; using System.Web; using System.Xml; -using System.Configuration; -using umbraco.BasePages; -using umbraco.BusinessLogic; using umbraco.businesslogic; -using umbraco.cms.businesslogic; -using umbraco.cms.businesslogic.cache; -using umbraco.cms.businesslogic.contentitem; -using umbraco.cms.businesslogic.datatype; -using umbraco.cms.businesslogic.language; -using umbraco.cms.businesslogic.media; -using umbraco.cms.businesslogic.member; -using umbraco.cms.businesslogic.property; -using umbraco.cms.businesslogic.web; -using umbraco.interfaces; -using umbraco.DataLayer; -using umbraco.BusinessLogic.Utils; +using umbraco.cms.businesslogic.packager; using umbraco.cms.presentation.Trees; using Umbraco.Core; +using umbraco.interfaces; namespace umbraco { @@ -64,18 +49,24 @@ namespace umbraco switch (m_packageType) { case "installed": - foreach (cms.businesslogic.packager.InstalledPackage p in cms.businesslogic.packager.InstalledPackage.GetAllInstalledPackages()) + Version v; + // Display the unique packages, ordered by the latest version number. [LK 2013-06-10] + var uniquePackages = InstalledPackage.GetAllInstalledPackages() + .OrderByDescending(x => Version.TryParse(x.Data.Version, out v) ? v : new Version()) + .GroupBy(x => x.Data.Name) + .Select(x => x.First()) + .OrderBy(x => x.Data.Id); + foreach (var p in uniquePackages) { - XmlTreeNode xNode = XmlTreeNode.Create(this); - xNode.NodeID = PACKAGE_TREE_PREFIX + p.Data.Id.ToString(); + var xNode = XmlTreeNode.Create(this); + xNode.NodeID = string.Concat(PACKAGE_TREE_PREFIX, p.Data.Id); xNode.Text = p.Data.Name; - xNode.Action = "javascript:openInstalledPackage('" + p.Data.Id.ToString() + "');"; + xNode.Action = string.Format("javascript:openInstalledPackage('{0}');", p.Data.Id); xNode.Icon = "package.gif"; xNode.OpenIcon = "package.gif"; xNode.NodeType = "createdPackageInstance"; xNode.Menu = null; tree.Add(xNode); - } break; diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/installedPackage.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/installedPackage.aspx index b1c2d9c8ec..990e4394ae 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/installedPackage.aspx +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/installedPackage.aspx @@ -56,7 +56,17 @@ - + + + + + + + + +
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/installedPackage.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/installedPackage.aspx.cs index 3b5dd9fb2b..8e75bdaae1 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/installedPackage.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/installedPackage.aspx.cs @@ -335,6 +335,20 @@ namespace umbraco.presentation.developer.packages bt_uninstall.Visible = false; pane_uninstall.Visible = false; } + + // List the package version history [LK 2013-067-10] + Version v; + var packageVersionHistory = cms.businesslogic.packager.InstalledPackage.GetAllInstalledPackages() + .Where(x => x.Data.Id != _pack.Data.Id && string.Equals(x.Data.Name, _pack.Data.Name, StringComparison.OrdinalIgnoreCase)) + .OrderBy(x => Version.TryParse(x.Data.Version, out v) ? v : new Version()); + + if (packageVersionHistory != null && packageVersionHistory.Count() > 0) + { + rptr_versions.DataSource = packageVersionHistory; + rptr_versions.DataBind(); + + pane_versions.Visible = true; + } } } } @@ -611,6 +625,8 @@ namespace umbraco.presentation.developer.packages pp_upgradeInstruction.Text = ui.Text("packager", "packageUpgradeInstructions"); bt_gotoUpgrade.Text = ui.Text("packager", "packageUpgradeDownload"); + pane_versions.Text = ui.Text("packager", "packageVersionHistory"); + pane_noItems.Text = ui.Text("packager", "packageNoItemsHeader"); pane_uninstall.Text = ui.Text("packager", "packageUninstallHeader"); diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/installedPackage.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/installedPackage.aspx.designer.cs index 398a23466d..e6dfc46646 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/installedPackage.aspx.designer.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/installedPackage.aspx.designer.cs @@ -1,10 +1,9 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.4200 // // Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// the code is regenerated. // //------------------------------------------------------------------------------ @@ -175,6 +174,33 @@ namespace umbraco.presentation.developer.packages { /// protected global::System.Web.UI.WebControls.Literal lt_readme; + /// + /// pane_versions control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.uicontrols.Pane pane_versions; + + /// + /// pp_versions control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::umbraco.uicontrols.PropertyPanel pp_versions; + + /// + /// rptr_versions control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Repeater rptr_versions; + /// /// pane_options control. ///