aboutsummaryrefslogtreecommitdiff
path: root/models
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2018-06-16 16:48:17 +0800
committerUnknwon <u@gogs.io>2018-06-16 16:48:47 +0800
commit86a27cf16dac95a56e1f594e7cef3f9d8930baf0 (patch)
tree4c5921ae2e6c48a0e82d0eb92075177b8bf39fd2 /models
parent08ae0dd74be0e35753c2ac6cbf3196f5bfd18b58 (diff)
modes/repo: syntax fix for PR #5234
Diffstat (limited to 'models')
-rw-r--r--models/repo.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/repo.go b/models/repo.go
index 3efb3635..b15b0175 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -1653,11 +1653,11 @@ func SearchRepositoryByName(opts *SearchRepoOptions) (repos []*Repository, count
// this does not include other people's private repositories even if opts.UserID is an admin.
if !opts.Private && opts.UserID > 0 {
sess.Join("LEFT", "access", "access.repo_id = repo.id").
- Where("(repo.owner_id = ? OR access.user_id = ? OR repo.is_private = ? OR (repo.is_private = ? AND (repo.allow_public_wiki = ? OR repo.allow_public_issues = ?)))", opts.UserID, opts.UserID, false, true, true, true)
+ Where("repo.owner_id = ? OR access.user_id = ? OR repo.is_private = ? OR (repo.is_private = ? AND (repo.allow_public_wiki = ? OR repo.allow_public_issues = ?))", opts.UserID, opts.UserID, false, true, true, true)
} else {
// Only return public repositories if opts.Private is not set
if !opts.Private {
- sess.And("(repo.is_private = ? OR (repo.is_private = ? AND (repo.allow_public_wiki = ? OR repo.allow_public_issues = ?))", false, true, true, true)
+ sess.And("repo.is_private = ? OR (repo.is_private = ? AND (repo.allow_public_wiki = ? OR repo.allow_public_issues = ?))", false, true, true, true)
}
}
if len(opts.Keyword) > 0 {