mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-09-26 20:55:55 +00:00
fix(code-search): fix broken pagination. (#9000)
Missing parameters for: - repo: path and mode - user: mode - explore: mode resolves forgejo/forgejo!8997 and codeberg/community!2098 <!--start release-notes-assistant--> ## Release notes <!--URL:https://codeberg.org/forgejo/forgejo--> - Bug fixes - [PR](https://codeberg.org/forgejo/forgejo/pulls/9000): <!--number 9000 --><!--line 0 --><!--description Zml4KGNvZGUtc2VhcmNoKTogZml4IGJyb2tlbiBwYWdpbmF0aW9uLg==-->fix(code-search): fix broken pagination.<!--description--> <!--end release-notes-assistant--> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9000 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: Shiny Nematoda <snematoda.751k2@aleeas.com> Co-committed-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
This commit is contained in:
parent
f58f84562a
commit
ecda48307d
4 changed files with 44 additions and 2 deletions
|
@ -147,6 +147,7 @@ func Code(ctx *context.Context) {
|
|||
pager := context.NewPagination(total, setting.UI.RepoSearchPagingNum, page, 5)
|
||||
pager.SetDefaultParams(ctx)
|
||||
pager.AddParam(ctx, "l", "Language")
|
||||
pager.AddParam(ctx, "mode", "CodeSearchMode")
|
||||
ctx.Data["Page"] = pager
|
||||
|
||||
ctx.HTML(http.StatusOK, tplExploreCode)
|
||||
|
|
|
@ -165,6 +165,8 @@ func Search(ctx *context.Context) {
|
|||
pager := context.NewPagination(total, setting.UI.RepoSearchPagingNum, page, 5)
|
||||
pager.SetDefaultParams(ctx)
|
||||
pager.AddParam(ctx, "l", "Language")
|
||||
pager.AddParam(ctx, "mode", "CodeSearchMode")
|
||||
pager.AddParam(ctx, "path", "CodeSearchPath")
|
||||
ctx.Data["Page"] = pager
|
||||
|
||||
ctx.HTML(http.StatusOK, tplSearch)
|
||||
|
|
|
@ -131,6 +131,7 @@ func CodeSearch(ctx *context.Context) {
|
|||
pager := context.NewPagination(total, setting.UI.RepoSearchPagingNum, page, 5)
|
||||
pager.SetDefaultParams(ctx)
|
||||
pager.AddParam(ctx, "l", "Language")
|
||||
pager.AddParam(ctx, "mode", "CodeSearchMode")
|
||||
ctx.Data["Page"] = pager
|
||||
|
||||
ctx.HTML(http.StatusOK, tplUserCode)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue