From 8d8c53be2dd591811736886f26d50c9bf56bf7e4 Mon Sep 17 00:00:00 2001 From: "antoine@DEVNET63-PC.wygwam.com" Date: Wed, 12 Dec 2012 13:46:42 +0100 Subject: [PATCH 1/4] #19335: Fixing Bug in the Orchard.Comments module migration Work Item: 19335 --HG-- branch : 1.x --- src/Orchard.Web/Modules/Orchard.Comments/Migrations.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Orchard.Web/Modules/Orchard.Comments/Migrations.cs b/src/Orchard.Web/Modules/Orchard.Comments/Migrations.cs index 2d3f4b74e..8c79accb8 100644 --- a/src/Orchard.Web/Modules/Orchard.Comments/Migrations.cs +++ b/src/Orchard.Web/Modules/Orchard.Comments/Migrations.cs @@ -106,7 +106,7 @@ namespace Orchard.Comments { ); SchemaBuilder.AlterTable("CommentSettingsPartRecord", table => table - .DropColumn("EnableSpamProtected") + .DropColumn("EnableSpamProtection") ); SchemaBuilder.AlterTable("CommentPartRecord", table => table From 06625c20fd1b9874b3da7c78f75dcb97200ee612 Mon Sep 17 00:00:00 2001 From: Piotr Szmyd Date: Fri, 14 Dec 2012 05:21:24 +0100 Subject: [PATCH 2/4] #19205: Fixing bug where menu items with same texts and urls, but under different parents, were treated as equal and merged into one. Work Item: 19205 --HG-- branch : 1.x --- src/Orchard/UI/Navigation/MenuItemComparer.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Orchard/UI/Navigation/MenuItemComparer.cs b/src/Orchard/UI/Navigation/MenuItemComparer.cs index 81124f090..43ccb4244 100644 --- a/src/Orchard/UI/Navigation/MenuItemComparer.cs +++ b/src/Orchard/UI/Navigation/MenuItemComparer.cs @@ -36,6 +36,18 @@ namespace Orchard.UI.Navigation { return false; } + if (!string.IsNullOrWhiteSpace(x.Position) && !string.IsNullOrWhiteSpace(y.Position)) { + var xLastDot = x.Position.LastIndexOf('.'); + var yLastDot = y.Position.LastIndexOf('.'); + var xParentPosition = xLastDot == -1 ? null : x.Position.Substring(0, xLastDot); + var yParentPosition = yLastDot == -1 ? null : y.Position.Substring(0, yLastDot); + + if (!string.Equals(xParentPosition, yParentPosition)) + { + return false; + } + } + return true; } From 3a315d3b485170feaefbdf026dbad2b40a6770d3 Mon Sep 17 00:00:00 2001 From: Piotr Szmyd Date: Fri, 14 Dec 2012 21:53:32 +0100 Subject: [PATCH 3/4] #19205: Fixing unit tests. Menu items with position X.0 should be treated as having a position X when searching for parent. Work Item: 19205 --HG-- branch : 1.x --- src/Orchard/UI/Navigation/MenuItemComparer.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Orchard/UI/Navigation/MenuItemComparer.cs b/src/Orchard/UI/Navigation/MenuItemComparer.cs index 43ccb4244..bc996b1aa 100644 --- a/src/Orchard/UI/Navigation/MenuItemComparer.cs +++ b/src/Orchard/UI/Navigation/MenuItemComparer.cs @@ -37,10 +37,10 @@ namespace Orchard.UI.Navigation { } if (!string.IsNullOrWhiteSpace(x.Position) && !string.IsNullOrWhiteSpace(y.Position)) { - var xLastDot = x.Position.LastIndexOf('.'); - var yLastDot = y.Position.LastIndexOf('.'); - var xParentPosition = xLastDot == -1 ? null : x.Position.Substring(0, xLastDot); - var yParentPosition = yLastDot == -1 ? null : y.Position.Substring(0, yLastDot); + var xPosSplitted = x.Position.Split('.').Where(ss => ss != "0").ToArray(); + var yPosSplitted = y.Position.Split('.').Where(ss => ss != "0").ToArray(); + var xParentPosition = xPosSplitted.Length > 0 ? string.Join(".", xPosSplitted.Take(xPosSplitted.Length - 1)) : null; + var yParentPosition = yPosSplitted.Length > 0 ? string.Join(".", yPosSplitted.Take(yPosSplitted.Length - 1)) : null; if (!string.Equals(xParentPosition, yParentPosition)) { From 274e3b9067c2a31276b889c93184c567c7f03883 Mon Sep 17 00:00:00 2001 From: Bertrand Le Roy Date: Fri, 1 Feb 2013 22:34:47 -0800 Subject: [PATCH 4/4] Typo fix --HG-- branch : 1.x --- .../Modules/Orchard.Indexing/Services/IndexService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Orchard.Web/Modules/Orchard.Indexing/Services/IndexService.cs b/src/Orchard.Web/Modules/Orchard.Indexing/Services/IndexService.cs index aad07cd8d..bfd5446b0 100644 --- a/src/Orchard.Web/Modules/Orchard.Indexing/Services/IndexService.cs +++ b/src/Orchard.Web/Modules/Orchard.Indexing/Services/IndexService.cs @@ -38,7 +38,7 @@ namespace Orchard.Indexing.Services UpdateIndex(indexName); } else { - Services.Notifier.Warning(T("The index {0} could no ben rebuilt. It might already be in use, please try again later.", indexName)); + Services.Notifier.Warning(T("The index {0} could not be rebuilt. It might already be in use, please try again later.", indexName)); } }