Refactoring usages of CurrentVersion to use Version in GlobalSettings.

Completes U4-1160
This commit is contained in:
Morten Christensen
2012-11-26 10:07:08 -01:00
parent d522ca9fdd
commit 4cc20efa08
3 changed files with 7 additions and 8 deletions

View File

@@ -90,7 +90,7 @@ namespace Umbraco.Core
try
{
string configStatus = ConfigurationStatus;
string currentVersion = GlobalSettings.CurrentVersion;
string currentVersion = GlobalSettings.Version.ToString(3);
if (currentVersion != configStatus)

View File

@@ -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
/// <summary>
/// Gets the current version of Umbraco.
/// Version class with the specified major, minor, build (Patch), and revision numbers.
/// </summary>
/// <remarks>
/// CURRENT UMBRACO VERSION ID
/// CURRENT UMBRACO VERSION ID.
/// </remarks>
public static Version Version
{
get
{
return typeof(GlobalSettings).Assembly.GetName().Version;
}
get { return _version ?? (_version = typeof (GlobalSettings).Assembly.GetName().Version); }
}
/// <summary>

View File

@@ -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");