Skip to content

Commit

Permalink
Fixes module setting saving issue, closes DNNCommunity#231
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinSigl authored and Kevin Sigl committed Sep 7, 2021
1 parent ae11df7 commit 08d4925
Show file tree
Hide file tree
Showing 4 changed files with 190 additions and 196 deletions.
8 changes: 4 additions & 4 deletions Components/EventModuleSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -371,13 +371,13 @@ public ArrayList ModuleCategoryIDs
[ModuleSetting(ParameterName = "ModuleCategoryIds")]
public string ModuleCategoryIdsList
{
get { return string.Join(";", ModuleCategoryIDs ?? new ArrayList()); }
get => ModuleCategoryIDs == null ? "" : string.Join(";", ModuleCategoryIDs.ToArray());

set
{
ModuleCategoryIDs = !string.IsNullOrWhiteSpace(value)
? new ArrayList(
value.Split(new[] {";"}, StringSplitOptions.RemoveEmptyEntries)
value.Split(new[] { ";" }, StringSplitOptions.RemoveEmptyEntries)
.Select(arg => arg)
.ToArray())
: new ArrayList();
Expand Down Expand Up @@ -429,13 +429,13 @@ public ArrayList ModuleLocationIDs
[ModuleSetting(ParameterName = "ModuleLocationIds")]
public string ModuleLocationIdsList
{
get { return string.Join(";", ModuleLocationIDs ?? new ArrayList()); }
get => ModuleLocationIDs == null ? "" : string.Join(";", ModuleLocationIDs.ToArray());

set
{
ModuleLocationIDs = !string.IsNullOrWhiteSpace(value)
? new ArrayList(
value.Split(new[] {";"}, StringSplitOptions.RemoveEmptyEntries)
value.Split(new[] { ";" }, StringSplitOptions.RemoveEmptyEntries)
.Select(arg => arg)
.ToArray())
: new ArrayList();
Expand Down
4 changes: 2 additions & 2 deletions EditEvents.ascx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1190,9 +1190,9 @@ public void LoadNewEventEmailRoles(int roleID)
{
foreach (EventCategoryInfo objCategory in tmpCategories)
{
foreach (int moduleCategory in Settings.ModuleCategoryIDs)
foreach (object moduleCategory in Settings.ModuleCategoryIDs)
{
if (moduleCategory == objCategory.Category)
if (Convert.ToInt32(moduleCategory) == objCategory.Category)
{
objCategories.Add(objCategory);
}
Expand Down
Loading

0 comments on commit 08d4925

Please sign in to comment.