1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-25 19:58:36 +00:00

Remove AddParamIfExist(AddParam) (#29841)

Follow #29834

Remove AddParamIfExist, use "AddParamString" instead, it should clearly
know what is being added into the parameters.
This commit is contained in:
wxiaoguang
2024-03-16 20:07:56 +08:00
committed by GitHub
parent 66902d89e5
commit a889381664
17 changed files with 55 additions and 58 deletions

View File

@@ -106,8 +106,8 @@ func Milestones(ctx *context.Context) {
ctx.Data["IsShowClosed"] = isShowClosed
pager := context.NewPagination(int(total), setting.UI.IssuePagingNum, page, 5)
pager.AddParamIfExist("state", ctx.Data["State"])
pager.AddParamIfExist("q", ctx.Data["Keyword"])
pager.AddParamString("state", fmt.Sprint(ctx.Data["State"]))
pager.AddParamString("q", keyword)
ctx.Data["Page"] = pager
ctx.HTML(http.StatusOK, tplMilestone)