mirror of
https://github.com/go-gitea/gitea.git
synced 2024-05-11 05:55:29 +00:00
Fix missing collabrative repos (#2367)
* fix missing collabrative repos * fix bug of collabrative * fix SQL quotes
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user