Merge pull request #4194 from ijaz-saeed/dev
Format Exception in int.Parse(route.ModuleId)
This commit is contained in:
commit
09b8087787
|
@ -1,5 +1,6 @@
|
||||||
@namespace Oqtane.Modules.Admin.Pages
|
@namespace Oqtane.Modules.Admin.Pages
|
||||||
@using Oqtane.Interfaces
|
@using Oqtane.Interfaces
|
||||||
|
@using System.Globalization
|
||||||
@inherits ModuleBase
|
@inherits ModuleBase
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject IPageService PageService
|
@inject IPageService PageService
|
||||||
|
@ -362,7 +363,7 @@
|
||||||
_parent = PageState.Pages.FirstOrDefault(item => item.PageId == _page.ParentId);
|
_parent = PageState.Pages.FirstOrDefault(item => item.PageId == _page.ParentId);
|
||||||
}
|
}
|
||||||
_children = new List<Page>();
|
_children = new List<Page>();
|
||||||
foreach (Page p in PageState.Pages.Where(item => (_parentid == "-1" && item.ParentId == null) || (item.ParentId == int.Parse(_parentid))))
|
foreach (Page p in PageState.Pages.Where(item => (_parentid == "-1" && item.ParentId == null) || (item.ParentId == int.Parse(_parentid, CultureInfo.InvariantCulture))))
|
||||||
{
|
{
|
||||||
if (p.PageId != _pageId && UserSecurity.IsAuthorized(PageState.User, PermissionNames.View, p.PermissionList))
|
if (p.PageId != _pageId && UserSecurity.IsAuthorized(PageState.User, PermissionNames.View, p.PermissionList))
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
@using System.Diagnostics.CodeAnalysis
|
@using System.Diagnostics.CodeAnalysis
|
||||||
@using System.Net
|
@using System.Net
|
||||||
@using Microsoft.AspNetCore.Http
|
@using Microsoft.AspNetCore.Http
|
||||||
|
@using System.Globalization
|
||||||
@namespace Oqtane.UI
|
@namespace Oqtane.UI
|
||||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||||
@inject SiteState SiteState
|
@inject SiteState SiteState
|
||||||
|
@ -103,7 +104,7 @@
|
||||||
_error = "";
|
_error = "";
|
||||||
|
|
||||||
Route route = new Route(_absoluteUri, SiteState.Alias.Path);
|
Route route = new Route(_absoluteUri, SiteState.Alias.Path);
|
||||||
int moduleid = int.Parse(route.ModuleId);
|
int moduleid = int.Parse(route.ModuleId, CultureInfo.InvariantCulture);
|
||||||
var action = route.Action;
|
var action = route.Action;
|
||||||
|
|
||||||
var querystring = Utilities.ParseQueryString(route.Query);
|
var querystring = Utilities.ParseQueryString(route.Query);
|
||||||
|
@ -263,7 +264,7 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
editmode = (page.PageId == ((user.Settings.ContainsKey("CP-editmode")) ? int.Parse(user.Settings["CP-editmode"]) : -1));
|
editmode = (page.PageId == ((user.Settings.ContainsKey("CP-editmode")) ? int.Parse(user.Settings["CP-editmode"], CultureInfo.InvariantCulture) : -1));
|
||||||
if (!editmode)
|
if (!editmode)
|
||||||
{
|
{
|
||||||
var userSettings = new Dictionary<string, string> { { "CP-editmode", "-1" } };
|
var userSettings = new Dictionary<string, string> { { "CP-editmode", "-1" } };
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
@using Oqtane.Shared
|
@using Oqtane.Shared
|
||||||
@using Oqtane.Themes
|
@using Oqtane.Themes
|
||||||
@using Oqtane.Extensions
|
@using Oqtane.Extensions
|
||||||
|
@using System.Globalization
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@inject IAntiforgery Antiforgery
|
@inject IAntiforgery Antiforgery
|
||||||
@inject IConfigManager ConfigManager
|
@inject IConfigManager ConfigManager
|
||||||
|
@ -176,7 +177,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// include stylesheets to prevent FOUC
|
// include stylesheets to prevent FOUC
|
||||||
var resources = GetPageResources(alias, site, page, int.Parse(route.ModuleId), route.Action);
|
var resources = GetPageResources(alias, site, page, int.Parse(route.ModuleId, CultureInfo.InvariantCulture), route.Action);
|
||||||
ManageStyleSheets(resources);
|
ManageStyleSheets(resources);
|
||||||
|
|
||||||
// scripts
|
// scripts
|
||||||
|
|
Loading…
Reference in New Issue
Block a user