Fix missing collabrative repos (#2367)
* fix missing collabrative repos * fix bug of collabrative * fix SQL quotes
This commit is contained in:
parent
da230a2872
commit
f61a1d210c
3 changed files with 44 additions and 39 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue