diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2024-03-16 20:07:56 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-16 12:07:56 +0000 |
commit | a8893816647140526055acc1c4cfe2d130ce7c47 (patch) | |
tree | 3133d65af67bf82843ac8ee7233b06ff5b2c0656 /routers/web/repo/packages.go | |
parent | 66902d89e567ab1ae6dfb828636999c61ff0149e (diff) | |
download | gitea-a8893816647140526055acc1c4cfe2d130ce7c47.tar.gz gitea-a8893816647140526055acc1c4cfe2d130ce7c47.zip |
Remove AddParamIfExist(AddParam) (#29841)
Follow #29834
Remove AddParamIfExist, use "AddParamString" instead, it should clearly
know what is being added into the parameters.
Diffstat (limited to 'routers/web/repo/packages.go')
-rw-r--r-- | routers/web/repo/packages.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/web/repo/packages.go b/routers/web/repo/packages.go index 41fc38dedb..57e578da37 100644 --- a/routers/web/repo/packages.go +++ b/routers/web/repo/packages.go @@ -70,8 +70,8 @@ func Packages(ctx *context.Context) { ctx.Data["RepositoryAccessMap"] = map[int64]bool{ctx.Repo.Repository.ID: true} // There is only the current repository pager := context.NewPagination(int(total), setting.UI.PackagesPagingNum, page, 5) - pager.AddParamIfExist("q", ctx.Data["Query"]) - pager.AddParamIfExist("type", ctx.Data["PackageType"]) + pager.AddParamString("q", query) + pager.AddParamString("type", packageType) ctx.Data["Page"] = pager ctx.HTML(http.StatusOK, tplPackagesList) |