Skip to content

Commit

Permalink
Unable to edit Module settings after moving Module to another page (#…
Browse files Browse the repository at this point in the history
…3353)

* Unable to edit Module settings after moving Module to another page

* Applying reviewer's comments
  • Loading branch information
Ahmed Elibyary authored and valadas committed Dec 3, 2019
1 parent e65a288 commit ff4f3b7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions DNN Platform/Library/Entities/Modules/ModuleController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1902,6 +1902,21 @@ public void MoveModule(int moduleId, int fromTabId, int toTabId, string toPaneNa
//Move the module to the Tab
dataProvider.MoveTabModule(fromTabId, moduleId, toTabId, toPaneName, UserController.Instance.GetCurrentUserInfo().UserID);

//Update the Tab reference for the module's ContentItems
var contentController = Util.GetContentController();
var contentItems = contentController.GetContentItemsByModuleId(moduleId);
if (contentItems != null)
{
foreach (var item in contentItems)
{
if (item.TabID != toTabId)
{
item.TabID = toTabId;
contentController.UpdateContentItem(item);
}
}
}

//Update Module Order for source tab, also updates the tabmodule version guid
UpdateTabModuleOrder(fromTabId);

Expand Down

0 comments on commit ff4f3b7

Please sign in to comment.