mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-26 12:03:16 +08:00
Removes useless and case sensitive check (#8352)
That check was useless because we use a int.TryParse. Morevoer queryString.AllKeys.Contains() is case sensitive.
This commit is contained in:
@@ -72,12 +72,9 @@ namespace Orchard.CustomForms.Controllers {
|
||||
var customForm = form.As<CustomFormPart>();
|
||||
|
||||
// Retrieve the id of the content to edit
|
||||
int contentId = 0;
|
||||
var queryString = Services.WorkContext.HttpContext.Request.QueryString;
|
||||
|
||||
if (queryString.AllKeys.Contains("contentId")) {
|
||||
int.TryParse(queryString["contentId"], out contentId);
|
||||
}
|
||||
int.TryParse(queryString["contentId"], out int contentId);
|
||||
|
||||
ContentItem contentItem;
|
||||
if (contentId > 0) {
|
||||
|
||||
Reference in New Issue
Block a user