mirror of
https://github.com/gogs/gogs.git
synced 2025-05-31 11:42:13 +00:00
* Modified repository keyword search to include description for #4287 * Replacing Where with And for #4548
This commit is contained in:
parent
c0be055541
commit
e9a2b72ddb
@ -1646,7 +1646,7 @@ func SearchRepositoryByName(opts *SearchRepoOptions) (repos []*Repository, _ int
|
||||
}
|
||||
}
|
||||
if len(opts.Keyword) > 0 {
|
||||
sess.And("repo.lower_name LIKE ?", "%"+strings.ToLower(opts.Keyword)+"%")
|
||||
sess.And("repo.lower_name LIKE ? OR repo.description LIKE ?", "%"+strings.ToLower(opts.Keyword)+"%", "%"+strings.ToLower(opts.Keyword)+"%")
|
||||
}
|
||||
if opts.OwnerID > 0 {
|
||||
sess.And("repo.owner_id = ?", opts.OwnerID)
|
||||
|
Loading…
x
Reference in New Issue
Block a user