diff options
author | delvh <leon@kske.dev> | 2023-02-04 14:26:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-04 21:26:38 +0800 |
commit | 4d20a4a1baeb9ed1bb5b3ed7c44b6046f6387303 (patch) | |
tree | 739c75ed66f8ba185af6f5657a1444c65eb64ab5 /models/repo | |
parent | ea13b23349ef98249deeb9469f6b1444de42abf5 (diff) | |
download | gitea-4d20a4a1baeb9ed1bb5b3ed7c44b6046f6387303.tar.gz gitea-4d20a4a1baeb9ed1bb5b3ed7c44b6046f6387303.zip |
Remove ONLY_SHOW_RELEVANT_REPOS setting (#21962)
Every user can already disable the filter manually, so the explicit
setting is absolutely useless and only complicates the logic.
Previously, there was also unexpected behavior when multiple query
parameters were present.
---------
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'models/repo')
-rw-r--r-- | models/repo/repo_list.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/models/repo/repo_list.go b/models/repo/repo_list.go index c6e9a204d1..d64368daa6 100644 --- a/models/repo/repo_list.go +++ b/models/repo/repo_list.go @@ -494,7 +494,7 @@ func SearchRepositoryCondition(opts *SearchRepoOptions) builder.Cond { } if opts.OnlyShowRelevant { - // Only show a repo that either has a topic or description. + // Only show a repo that has at least a topic, an icon, or a description subQueryCond := builder.NewCond() // Topic checking. Topics are present. @@ -504,13 +504,13 @@ func SearchRepositoryCondition(opts *SearchRepoOptions) builder.Cond { subQueryCond = subQueryCond.Or(builder.And(builder.Neq{"topics": "null"}, builder.Neq{"topics": "[]"})) } - // Description checking. Description not empty. + // Description checking. Description not empty subQueryCond = subQueryCond.Or(builder.Neq{"description": ""}) - // Repo has a avatar. + // Repo has a avatar subQueryCond = subQueryCond.Or(builder.Neq{"avatar": ""}) - // Always hide repo's that are empty. + // Always hide repo's that are empty subQueryCond = subQueryCond.And(builder.Eq{"is_empty": false}) cond = cond.And(subQueryCond) |