diff options
Diffstat (limited to 'routers/web/repo/search.go')
-rw-r--r-- | routers/web/repo/search.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/routers/web/repo/search.go b/routers/web/repo/search.go index 766dd5726a..16e620f57d 100644 --- a/routers/web/repo/search.go +++ b/routers/web/repo/search.go @@ -24,12 +24,11 @@ func Search(ctx *context.Context) { language := ctx.FormTrim("l") keyword := ctx.FormTrim("q") - queryType := ctx.FormTrim("t") - isFuzzy := queryType != "match" + isFuzzy := ctx.FormOptionalBool("fuzzy").ValueOrDefault(true) ctx.Data["Keyword"] = keyword ctx.Data["Language"] = language - ctx.Data["queryType"] = queryType + ctx.Data["IsFuzzy"] = isFuzzy ctx.Data["PageIsViewCode"] = true if keyword == "" { @@ -54,7 +53,7 @@ func Search(ctx *context.Context) { ctx.Data["CodeIndexerUnavailable"] = !code_indexer.IsAvailable(ctx) } - ctx.Data["SourcePath"] = ctx.Repo.Repository.Link() + ctx.Data["Repo"] = ctx.Repo.Repository ctx.Data["SearchResults"] = searchResults ctx.Data["SearchResultLanguages"] = searchResultLanguages |