simplify template

This commit is contained in:
Shiny Nematoda 2024-03-20 12:22:43 +00:00
parent ed15c92668
commit 4a061ca26c
4 changed files with 6 additions and 6 deletions

View file

@ -41,7 +41,7 @@ func Search(ctx *context.Context) {
}
if setting.Indexer.RepoIndexerEnabled {
ctx.Data["CodeIndexerEnabled"] = true
ctx.Data["CodeIndexerDisabled"] = false
total, searchResults, searchResultLanguages, err := code_indexer.PerformSearch(ctx, &code_indexer.SearchOptions{
RepoIDs: []int64{ctx.Repo.Repository.ID},
@ -77,7 +77,7 @@ func Search(ctx *context.Context) {
return
}
ctx.Data["CodeIndexerEnabled"] = false
ctx.Data["CodeIndexerDisabled"] = true
ctx.Data["SearchResults"] = data
pager := context.NewPagination(len(data), setting.UI.RepoSearchPagingNum, page, 5)