aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/repo
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/repo')
-rw-r--r--routers/web/repo/issue.go2
-rw-r--r--routers/web/repo/search.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go
index 7d8ec3a6f3..095738ff29 100644
--- a/routers/web/repo/issue.go
+++ b/routers/web/repo/issue.go
@@ -191,7 +191,7 @@ func issues(ctx *context.Context, milestoneID, projectID int64, isPullOption uti
if len(keyword) > 0 {
issueIDs, err = issue_indexer.SearchIssuesByKeyword(ctx, []int64{repo.ID}, keyword)
if err != nil {
- if issue_indexer.IsAvailable() {
+ if issue_indexer.IsAvailable(ctx) {
ctx.ServerError("issueIndexer.Search", err)
return
}
diff --git a/routers/web/repo/search.go b/routers/web/repo/search.go
index a043198472..3c0fa4bc00 100644
--- a/routers/web/repo/search.go
+++ b/routers/web/repo/search.go
@@ -45,13 +45,13 @@ func Search(ctx *context.Context) {
total, searchResults, searchResultLanguages, err := code_indexer.PerformSearch(ctx, []int64{ctx.Repo.Repository.ID},
language, keyword, page, setting.UI.RepoSearchPagingNum, isMatch)
if err != nil {
- if code_indexer.IsAvailable() {
+ if code_indexer.IsAvailable(ctx) {
ctx.ServerError("SearchResults", err)
return
}
ctx.Data["CodeIndexerUnavailable"] = true
} else {
- ctx.Data["CodeIndexerUnavailable"] = !code_indexer.IsAvailable()
+ ctx.Data["CodeIndexerUnavailable"] = !code_indexer.IsAvailable(ctx)
}
ctx.Data["SourcePath"] = ctx.Repo.Repository.Link()