diff options
author | 6543 <6543@obermui.de> | 2021-08-11 17:08:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-11 18:08:52 +0300 |
commit | f1a810e0901b80eb6bc21103434fc0737af17eaa (patch) | |
tree | 9656d780cf19fd745f41eef0012701458aa271c4 /routers/web/admin | |
parent | 2d25b7d44bedf8f17cc2b49f39d1cee662b199a5 (diff) | |
download | gitea-f1a810e0901b80eb6bc21103434fc0737af17eaa.tar.gz gitea-f1a810e0901b80eb6bc21103434fc0737af17eaa.zip |
Related refactors to ctx.FormX functions (#16567)
* use FormTrim if posible
* speedup goGet
* only convert if nessesary
Diffstat (limited to 'routers/web/admin')
-rw-r--r-- | routers/web/admin/repos.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/routers/web/admin/repos.go b/routers/web/admin/repos.go index 15d4554957..4c3f2ad614 100644 --- a/routers/web/admin/repos.go +++ b/routers/web/admin/repos.go @@ -7,7 +7,6 @@ package admin import ( "net/http" "net/url" - "strconv" "strings" "code.gitea.io/gitea/models" @@ -111,7 +110,7 @@ func UnadoptedRepos(ctx *context.Context) { func AdoptOrDeleteRepository(ctx *context.Context) { dir := ctx.FormString("id") action := ctx.FormString("action") - page := ctx.FormInt("page") + page := ctx.FormString("page") q := ctx.FormString("q") dirSplit := strings.SplitN(dir, "/", 2) @@ -162,5 +161,5 @@ func AdoptOrDeleteRepository(ctx *context.Context) { } ctx.Flash.Success(ctx.Tr("repo.delete_preexisting_success", dir)) } - ctx.Redirect(setting.AppSubURL + "/admin/repos/unadopted?search=true&q=" + url.QueryEscape(q) + "&page=" + strconv.Itoa(page)) + ctx.Redirect(setting.AppSubURL + "/admin/repos/unadopted?search=true&q=" + url.QueryEscape(q) + "&page=" + page) } |