mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-26 20:16:15 +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>();
|
var customForm = form.As<CustomFormPart>();
|
||||||
|
|
||||||
// Retrieve the id of the content to edit
|
// Retrieve the id of the content to edit
|
||||||
int contentId = 0;
|
|
||||||
var queryString = Services.WorkContext.HttpContext.Request.QueryString;
|
var queryString = Services.WorkContext.HttpContext.Request.QueryString;
|
||||||
|
|
||||||
if (queryString.AllKeys.Contains("contentId")) {
|
int.TryParse(queryString["contentId"], out int contentId);
|
||||||
int.TryParse(queryString["contentId"], out contentId);
|
|
||||||
}
|
|
||||||
|
|
||||||
ContentItem contentItem;
|
ContentItem contentItem;
|
||||||
if (contentId > 0) {
|
if (contentId > 0) {
|
||||||
contentItem = _contentManager.Get(contentId);
|
contentItem = _contentManager.Get(contentId);
|
||||||
|
|||||||
Reference in New Issue
Block a user