Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace DotNetNuke.Web.Client.ResourceManager
{
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;

Expand Down Expand Up @@ -52,7 +53,11 @@ public ClientResourceController(IHostSettings hostSettings, IApplicationStatusIn
this.clientResourceSettings = clientResourceSettings;
this.RegisterPathNameAlias("SharedScripts", "~/Resources/Shared/Scripts/");
this.controllerId = Guid.NewGuid();
if (clientResourceSettings != null)
if (hostSettings.DebugMode)
{
this.crmVersion = int.Parse($"{DateTime.UtcNow:HHmmssfff}", NumberStyles.None, CultureInfo.InvariantCulture);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
this.crmVersion = int.Parse($"{DateTime.UtcNow:HHmmssfff}", NumberStyles.None, CultureInfo.InvariantCulture);
this.crmVersion = int.Parse($"{DateTime.UtcNow:MMddyyyyHHmmssfff}", NumberStyles.None, CultureInfo.InvariantCulture);

Maybe a bit of overkill, but this guarantees uniqueness across multiple days.

I do perfer the change here with the CRM version attribute/value

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to keep it to nine digits so that it was inside the bounds of an Int32 value. We could take off ff from the end and add dd to the front…

}
else if (clientResourceSettings != null)
{
this.crmVersion = clientResourceSettings.OverrideDefaultSettings ? clientResourceSettings.PortalCrmVersion : clientResourceSettings.HostCrmVersion;
}
Expand Down
Loading