From d6f77feeba2a7d857e39815de0731a1cee7452ed Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Tue, 19 Oct 2010 14:48:04 -0700 Subject: [PATCH] Corrected layer unicity test --HG-- branch : dev --- .../Modules/Orchard.Widgets/Controllers/AdminController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.Widgets/Controllers/AdminController.cs index 98217016c..bc382e3d2 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/Controllers/AdminController.cs +++ b/src/Orchard.Web/Modules/Orchard.Widgets/Controllers/AdminController.cs @@ -340,7 +340,7 @@ namespace Orchard.Widgets.Controllers { layer.LayerRule = "true"; } - if(_widgetsService.GetLayers().Any(l => String.CompareOrdinal(l.Name, layer.Name) == 0)) { + if(_widgetsService.GetLayers().Count(l => String.Equals(l.Name, layer.Name, StringComparison.InvariantCultureIgnoreCase)) > 1) { // the current layer counts for 1 ModelState.AddModelError("Name", T("A Layer with the same name already exists").Text); return false; }