summaryrefslogtreecommitdiffstats
path: root/routers/repo/search.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2018-03-16 22:04:33 +0800
committerGitHub <noreply@github.com>2018-03-16 22:04:33 +0800
commit9e5d0a09eb7370daedb1cf572d25ffa150eacf17 (patch)
treef39cbf6a572bda0e82caec7ef1697ceb70e37f1e /routers/repo/search.go
parent4163cdf3ea6d6ca43b694de0c15cc93659d6c2b3 (diff)
downloadgitea-9e5d0a09eb7370daedb1cf572d25ffa150eacf17.tar.gz
gitea-9e5d0a09eb7370daedb1cf572d25ffa150eacf17.zip
Global code search support (#3664)
* add global code search on explore * fix bug when no anyone public repos * change the icon * fix typo and add UnitTypeCode check for login non-admin user * fix ui description when no match
Diffstat (limited to 'routers/repo/search.go')
-rw-r--r--routers/repo/search.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/repo/search.go b/routers/repo/search.go
index ed209f2ddc..95715c30c6 100644
--- a/routers/repo/search.go
+++ b/routers/repo/search.go
@@ -29,7 +29,8 @@ func Search(ctx *context.Context) {
if page <= 0 {
page = 1
}
- total, searchResults, err := search.PerformSearch(ctx.Repo.Repository.ID, keyword, page, setting.UI.RepoSearchPagingNum)
+ total, searchResults, err := search.PerformSearch([]int64{ctx.Repo.Repository.ID},
+ keyword, page, setting.UI.RepoSearchPagingNum)
if err != nil {
ctx.ServerError("SearchResults", err)
return