mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-26 03:40:56 +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,13 +72,10 @@ 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) {
|
||||
contentItem = _contentManager.Get(contentId);
|
||||
|
||||
Reference in New Issue
Block a user