diff --git a/src/Umbraco.Core/ApplicationContext.cs b/src/Umbraco.Core/ApplicationContext.cs index ef8c7ea340..a096858f90 100644 --- a/src/Umbraco.Core/ApplicationContext.cs +++ b/src/Umbraco.Core/ApplicationContext.cs @@ -90,7 +90,7 @@ namespace Umbraco.Core try { string configStatus = ConfigurationStatus; - string currentVersion = GlobalSettings.CurrentVersion; + string currentVersion = GlobalSettings.Version.ToString(3); if (currentVersion != configStatus) diff --git a/src/Umbraco.Core/Configuration/GlobalSettings.cs b/src/Umbraco.Core/Configuration/GlobalSettings.cs index b9d669038d..5903598d09 100644 --- a/src/Umbraco.Core/Configuration/GlobalSettings.cs +++ b/src/Umbraco.Core/Configuration/GlobalSettings.cs @@ -27,6 +27,7 @@ namespace Umbraco.Core.Configuration #region Private static fields + private static Version _version; private static string _reservedUrlsCache; private static string _reservedPathsCache; private static StartsWithContainer _reservedList = new StartsWithContainer(); @@ -253,7 +254,7 @@ namespace Umbraco.Core.Configuration try { string configStatus = ConfigurationStatus; - string currentVersion = CurrentVersion; + string currentVersion = Version.ToString(3); if (currentVersion != configStatus) @@ -407,16 +408,14 @@ namespace Umbraco.Core.Configuration /// /// Gets the current version of Umbraco. + /// Version class with the specified major, minor, build (Patch), and revision numbers. /// /// - /// CURRENT UMBRACO VERSION ID + /// CURRENT UMBRACO VERSION ID. /// public static Version Version { - get - { - return typeof(GlobalSettings).Assembly.GetName().Version; - } + get { return _version ?? (_version = typeof (GlobalSettings).Assembly.GetName().Version); } } /// diff --git a/src/Umbraco.Tests/Routing/UmbracoModuleTests.cs b/src/Umbraco.Tests/Routing/UmbracoModuleTests.cs index c00e97eb15..78a484e8fd 100644 --- a/src/Umbraco.Tests/Routing/UmbracoModuleTests.cs +++ b/src/Umbraco.Tests/Routing/UmbracoModuleTests.cs @@ -57,7 +57,7 @@ namespace Umbraco.Tests.Routing //create the module _module = new UmbracoModule(); - ConfigurationManager.AppSettings.Set("umbracoConfigurationStatus", Umbraco.Core.Configuration.GlobalSettings.CurrentVersion); + ConfigurationManager.AppSettings.Set("umbracoConfigurationStatus", Umbraco.Core.Configuration.GlobalSettings.Version.ToString(3)); ConfigurationManager.AppSettings.Set("umbracoReservedPaths", "~/umbraco,~/install/"); ConfigurationManager.AppSettings.Set("umbracoReservedUrls", "~/config/splashes/booting.aspx,~/install/default.aspx,~/config/splashes/noNodes.aspx,~/VSEnterpriseHelper.axd");