Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get the module id from query string correctly when redirect mixed case option enabled. #3438

Merged
merged 1 commit into from
Jan 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions DNN Platform/DotNetNuke.Web.Mvc/MvcHostControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using System.Web.Routing;
using System.Web.UI;
using DotNetNuke.Collections;
using DotNetNuke.Common.Utilities;
using DotNetNuke.ComponentModel;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Entities.Modules.Actions;
Expand Down Expand Up @@ -115,12 +116,19 @@ private ModuleRequestContext GetModuleRequestContext(HttpContextBase httpContext

RouteData routeData;

var queryString = httpContext.Request.QueryString;

if (String.IsNullOrEmpty(_controlKey))
{
_controlKey = httpContext.Request.QueryString.GetValueOrDefault("ctl", String.Empty);
_controlKey = queryString.GetValueOrDefault("ctl", String.Empty);
}

var moduleId = Null.NullInteger;
if (queryString["moduleid"] != null)
{
int.TryParse(queryString["moduleid"], out moduleId);
}

var moduleId = httpContext.Request.QueryString.GetValueOrDefault("moduleId", -1);
if (moduleId != ModuleContext.ModuleId && String.IsNullOrEmpty(_controlKey))
{
//Set default routeData for module that is not the "selected" module
Expand Down