Skip to content

Commit f0a114a

Browse files
committed
return redirect if has url.
1 parent a9a8037 commit f0a114a

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

Easy.CMS.Web/Modules/Article/Controllers/ArticleController.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ public override ActionResult Edit(ArticleEntity entity)
4040
if (entity.ActionType == ActionType.Publish)
4141
{
4242
Service.Publish(entity.ID);
43-
var returnUrl = Request.QueryString["ReturnUrl"];
44-
if (returnUrl.IsNotNullAndWhiteSpace())
45-
{
46-
return Redirect(returnUrl);
47-
}
43+
}
44+
var returnUrl = Request.QueryString["ReturnUrl"];
45+
if (returnUrl.IsNotNullAndWhiteSpace())
46+
{
47+
return Redirect(returnUrl);
4848
}
4949
return result;
5050
}
51-
51+
5252
}
5353
}

Easy.CMS.Web/Modules/Product/Controllers/ProductController.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ public override ActionResult Edit(ProductEntity entity)
3535
if (entity.ActionType == ActionType.Publish)
3636
{
3737
Service.Publish(entity.ID);
38-
var returnUrl = Request.QueryString["ReturnUrl"];
39-
if (returnUrl.IsNotNullAndWhiteSpace())
40-
{
41-
return Redirect(returnUrl);
42-
}
38+
}
39+
var returnUrl = Request.QueryString["ReturnUrl"];
40+
if (returnUrl.IsNotNullAndWhiteSpace())
41+
{
42+
return Redirect(returnUrl);
4343
}
4444
return result;
4545
}
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)