From 5a928aa459b5cd926633b2d85018daca8e5846ae Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 20 Nov 2013 17:28:33 +1100 Subject: [PATCH] FIxes installer when duplicate conflicts: U4-3612 Cannot install Txt starter kit in the back office Conflicts: src/umbraco.cms/businesslogic/Packager/Installer.cs --- .../businesslogic/Packager/Installer.cs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/umbraco.cms/businesslogic/Packager/Installer.cs b/src/umbraco.cms/businesslogic/Packager/Installer.cs index d099849b0f..4c9b2587e9 100644 --- a/src/umbraco.cms/businesslogic/Packager/Installer.cs +++ b/src/umbraco.cms/businesslogic/Packager/Installer.cs @@ -857,9 +857,14 @@ namespace umbraco.cms.businesslogic.packager { var m = new Macro(alias); this._containsMacroConflict = true; - this._conflictingMacroAliases.Add(m.Name, alias); + + if (_conflictingMacroAliases.ContainsKey(m.Name) == false) + { + _conflictingMacroAliases.Add(m.Name, alias); + } } catch (IndexOutOfRangeException) { } //thrown when the alias doesn't exist in the DB, ie - macro not there + } } } @@ -872,7 +877,10 @@ namespace umbraco.cms.businesslogic.packager if (t != null) { this._containsTemplateConflict = true; - this._conflictingTemplateAliases.Add(t.Text, alias); + if (_conflictingTemplateAliases.ContainsKey(t.Text) == false) + { + _conflictingTemplateAliases.Add(t.Text, alias); + } } } } @@ -886,7 +894,10 @@ namespace umbraco.cms.businesslogic.packager if (s != null) { this._containsStyleSheetConflict = true; - this._conflictingStyleSheetNames.Add(s.Text, alias); + if (_conflictingStyleSheetNames.ContainsKey(s.Text) == false) + { + _conflictingStyleSheetNames.Add(s.Text, alias); + } } } }