Rename context.Query to context.Form (#16562)

This commit is contained in:
Lunny Xiao 2021-07-29 09:42:15 +08:00 committed by GitHub
parent 3705168837
commit 33e0b38287
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
85 changed files with 393 additions and 396 deletions

View file

@ -416,7 +416,7 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st
isTextFile := st.IsText()
isLFSFile := false
isDisplayingSource := ctx.Query("display") == "source"
isDisplayingSource := ctx.Form("display") == "source"
isDisplayingRendered := !isDisplayingSource
//Check for LFS meta file
@ -756,7 +756,7 @@ func renderCode(ctx *context.Context) {
// RenderUserCards render a page show users according the input template
func RenderUserCards(ctx *context.Context, total int, getter func(opts models.ListOptions) ([]*models.User, error), tpl base.TplName) {
page := ctx.QueryInt("page")
page := ctx.FormInt("page")
if page <= 0 {
page = 1
}