summaryrefslogtreecommitdiffstats
path: root/routers/home.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2017-08-24 22:01:03 +0800
committerGitHub <noreply@github.com>2017-08-24 22:01:03 +0800
commitf61a1d210c4ed6f616b4bee25e8231b5bc67a640 (patch)
tree340147776c7485d154b4ed9e7c0c604e34fdaa53 /routers/home.go
parentda230a287264d38156e950a3149e43f65599e65b (diff)
downloadgitea-f61a1d210c4ed6f616b4bee25e8231b5bc67a640.tar.gz
gitea-f61a1d210c4ed6f616b4bee25e8231b5bc67a640.zip
Fix missing collabrative repos (#2367)
* fix missing collabrative repos * fix bug of collabrative * fix SQL quotes
Diffstat (limited to 'routers/home.go')
-rw-r--r--routers/home.go24
1 files changed, 13 insertions, 11 deletions
diff --git a/routers/home.go b/routers/home.go
index 0f7b214627..16d0720551 100644
--- a/routers/home.go
+++ b/routers/home.go
@@ -112,11 +112,12 @@ func RenderRepoSearch(ctx *context.Context, opts *RepoSearchOptions) {
keyword := strings.Trim(ctx.Query("q"), " ")
if len(keyword) == 0 {
repos, count, err = opts.Ranger(&models.SearchRepoOptions{
- Page: page,
- PageSize: opts.PageSize,
- Searcher: ctx.User,
- OrderBy: orderBy,
- Private: opts.Private,
+ Page: page,
+ PageSize: opts.PageSize,
+ Searcher: ctx.User,
+ OrderBy: orderBy,
+ Private: opts.Private,
+ Collaborate: true,
})
if err != nil {
ctx.Handle(500, "opts.Ranger", err)
@@ -125,12 +126,13 @@ func RenderRepoSearch(ctx *context.Context, opts *RepoSearchOptions) {
} else {
if isKeywordValid(keyword) {
repos, count, err = models.SearchRepositoryByName(&models.SearchRepoOptions{
- Keyword: keyword,
- OrderBy: orderBy,
- Private: opts.Private,
- Page: page,
- PageSize: opts.PageSize,
- Searcher: ctx.User,
+ Keyword: keyword,
+ OrderBy: orderBy,
+ Private: opts.Private,
+ Page: page,
+ PageSize: opts.PageSize,
+ Searcher: ctx.User,
+ Collaborate: true,
})
if err != nil {
ctx.Handle(500, "SearchRepositoryByName", err)