summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-03-29 15:41:45 +0200
committerGitHub <noreply@github.com>2023-03-29 15:41:45 +0200
commite57e1144c5ae7a2995e6818c6ae32139e563add7 (patch)
treeeea2b49bef9f1469f99467b5855f74fc28274db4 /modules
parentDon't apply the group filter when listing LDAP group membership if it is empt... (diff)
downloadforgejo-e57e1144c5ae7a2995e6818c6ae32139e563add7.tar.xz
forgejo-e57e1144c5ae7a2995e6818c6ae32139e563add7.zip
Add ONLY_SHOW_RELEVANT_REPOS back, fix explore page bug, make code more strict (#23766)
Follow #21962 After I eat my own dogfood, I would say that ONLY_SHOW_RELEVANT_REPOS=false is necessary for many private/enterprise instances, because many private repositories do not have "description/topic", users just want to search by their names. This PR also adds `PageIsExploreRepositories` check, to make code more strict, because the `search` template is shared for different purpose. And during the test, I found a bug that the "Search" button didn't respect the "relevant" parameter, so this PR fixes the bug by the way together. I think this PR needs to be backported.
Diffstat (limited to 'modules')
-rw-r--r--modules/setting/ui.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/setting/ui.go b/modules/setting/ui.go
index 2df3c35c76..90bad50d3b 100644
--- a/modules/setting/ui.go
+++ b/modules/setting/ui.go
@@ -139,6 +139,9 @@ func loadUIFrom(rootCfg ConfigProvider) {
UI.DefaultShowFullName = sec.Key("DEFAULT_SHOW_FULL_NAME").MustBool(false)
UI.SearchRepoDescription = sec.Key("SEARCH_REPO_DESCRIPTION").MustBool(true)
UI.UseServiceWorker = sec.Key("USE_SERVICE_WORKER").MustBool(false)
+
+ // OnlyShowRelevantRepos=false is important for many private/enterprise instances,
+ // because many private repositories do not have "description/topic", users just want to search by their names.
UI.OnlyShowRelevantRepos = sec.Key("ONLY_SHOW_RELEVANT_REPOS").MustBool(false)
UI.ReactionsLookup = make(container.Set[string])