Skip to content

Commit

Permalink
MaxTitleLength constant is now Pascal case
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreaPiovanelli committed Jan 19, 2024
1 parent 65a90d5 commit 05511a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Orchard.Web/Core/Title/Migrations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public int Create() {
SchemaBuilder.CreateTable("TitlePartRecord",
table => table
.ContentPartVersionRecord()
.Column<string>("Title", column => column.WithLength(TitlePartSettings.MAX_TITLE_LENGTH))
.Column<string>("Title", column => column.WithLength(TitlePartSettings.MaxTitleLength))
);

ContentDefinitionManager.AlterPartDefinition("TitlePart", builder => builder
Expand Down
4 changes: 2 additions & 2 deletions src/Orchard.Web/Core/Title/Settings/TitlePartSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ namespace Orchard.Core.Title.Settings {

public class TitlePartSettings {
// Whenever this constant is changed a new migration step must be created to update the length of the field on the DB
public const int MAX_TITLE_LENGTH = 1024;
[Range(0, MAX_TITLE_LENGTH)]
public const int MaxTitleLength = 1024;
[Range(0, MaxTitleLength)]
[DisplayName("Maximum Length")]
public int MaxLength {get; set;}

Expand Down

0 comments on commit 05511a8

Please sign in to comment.