Skip to content

Commit

Permalink
DNN-25441: fixed module content export validation (#3721)
Browse files Browse the repository at this point in the history
  • Loading branch information
daguiler authored May 4, 2020
1 parent 05f4062 commit 14c5d0c
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions DNN Platform/Website/admin/Modules/Export.ascx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -219,23 +219,24 @@ protected void OnExportClick(object sender, EventArgs e)
{
try
{
IFolderInfo folder = null;
if (cboFolders.SelectedItem != null && !String.IsNullOrEmpty(txtFile.Text))
{
var folder = FolderManager.Instance.GetFolder(cboFolders.SelectedItemValueAsInt);
if (folder != null)
folder = FolderManager.Instance.GetFolder(cboFolders.SelectedItemValueAsInt);
}

if (folder != null)
{
var strFile = "content." + CleanName(Module.DesktopModule.ModuleName) + "." + CleanName(txtFile.Text) + ".export";
var strMessage = ExportModule(ModuleId, strFile, folder);
if (String.IsNullOrEmpty(strMessage))
{
var strFile = "content." + CleanName(Module.DesktopModule.ModuleName) + "." + CleanName(txtFile.Text) + ".export";
var strMessage = ExportModule(ModuleId, strFile, folder);
if (String.IsNullOrEmpty(strMessage))
{
Response.Redirect(ReturnURL, true);
}
else
{
UI.Skins.Skin.AddModuleMessage(this, strMessage, ModuleMessage.ModuleMessageType.RedError);
}
Response.Redirect(ReturnURL, true);
}
else
{
UI.Skins.Skin.AddModuleMessage(this, strMessage, ModuleMessage.ModuleMessageType.RedError);
}

}
else
{
Expand Down

0 comments on commit 14c5d0c

Please sign in to comment.