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 authored and GitHub committed 2024-03-16 12:07:56 +00:00
1 parent 66902d89e5
commit a889381664
17 files changed
+55 -58

No files matched your search

+1 -1
View File
@@ -137,7 +137,7 @@ func Code(ctx *context.Context) {
pager := context.NewPagination(total, setting.UI.RepoSearchPagingNum, page, 5)
pager.SetDefaultParams(ctx)
pager.AddParamIfExist("l", ctx.Data["Language"])
pager.AddParamString("l", language)
ctx.Data["Page"] = pager
ctx.HTML(http.StatusOK, tplExploreCode)