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

Improved some defaults for logging #5820

Merged
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,14 @@ private static int GetTabModuleInfoFromMoniker(string monikerValue)
if (ids != null && ids.Any())
{
return ids.First();
}

if (Logger.IsWarnEnabled)
{
Logger.WarnFormat("The specified moniker ({0}) is not defined in the system", monikerValue);
}
}

if (Logger.IsWarnEnabled)
{
Logger.WarnFormat("The specified moniker ({0}) is not defined in the system", monikerValue);
}

return Null.NullInteger;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,11 @@ private static int GetTabModuleInfoFromMoniker(string monikerValue)
{
return ids.First();
}
}

if (Logger.IsWarnEnabled)
{
Logger.WarnFormat("The specified moniker ({0}) is not defined in the system", monikerValue);
if (Logger.IsWarnEnabled)
{
Logger.WarnFormat("The specified moniker ({0}) is not defined in the system", monikerValue);
}
}

return Null.NullInteger;
Expand Down
3 changes: 1 addition & 2 deletions DNN Platform/HttpModules/UrlRewrite/BasicUrlRewriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,9 @@ internal override void RewriteUrl(object sender, EventArgs e)
}
}
}
catch (ThreadAbortException exc)
catch (ThreadAbortException)
{
// Do nothing if Thread is being aborted - there are two response.redirect calls in the Try block
Logger.Debug(exc);
}
catch (Exception ex)
{
Expand Down
6 changes: 6 additions & 0 deletions DNN Platform/Modules/DDRMenu/MenuBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,12 @@ private void FilterNodes(string nodeString, bool exclude)
this.RootNode.Children.FindAll(
n =>
{
// no need to check when the node is not a page
if (n.TabId <= 0)
{
return false;
}

var tab = TabController.Instance.GetTab(n.TabId, Null.NullInteger, false);
foreach (TabPermissionInfo perm in tab.TabPermissions)
{
Expand Down