Browse Source

method name updated

pull/3720/head
Ahmet 6 years ago
parent
commit
607ca586d3
  1. 2
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Edit.cshtml.cs
  2. 2
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Index.cshtml.cs
  3. 2
      modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Helpers/BlogNameControlHelper.cs

2
modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Edit.cshtml.cs

@ -40,7 +40,7 @@ namespace Volo.Blogging.Pages.Blog.Posts
{ {
return Redirect("/"); return Redirect("/");
} }
if (BlogNameControlHelper.IsFileFormat(BlogShortName)) if (BlogNameControlHelper.IsProhibitedFileFormatName(BlogShortName))
{ {
return NotFound(); return NotFound();
} }

2
modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Index.cshtml.cs

@ -38,7 +38,7 @@ namespace Volo.Blogging.Pages.Blog.Posts
public virtual async Task<ActionResult> OnGetAsync() public virtual async Task<ActionResult> OnGetAsync()
{ {
if (BlogNameControlHelper.IsFileFormat(BlogShortName)) if (BlogNameControlHelper.IsProhibitedFileFormatName(BlogShortName))
{ {
return NotFound(); return NotFound();
} }

2
modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Shared/Helpers/BlogNameControlHelper.cs

@ -7,7 +7,7 @@ namespace Volo.Blogging.Pages.Blogs.Shared.Helpers
{ {
public static readonly string[] ProhibitedFileExtensions = new string[] {".ico", ".txt", ".php"}; public static readonly string[] ProhibitedFileExtensions = new string[] {".ico", ".txt", ".php"};
public static bool IsFileFormat(string blogShortName) public static bool IsProhibitedFileFormatName(string blogShortName)
{ {
if (!string.IsNullOrWhiteSpace(blogShortName)) if (!string.IsNullOrWhiteSpace(blogShortName))
{ {

Loading…
Cancel
Save