From f3dd678356dec615aa626996e1d07e4946fd4d21 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Sun, 13 Aug 2023 13:36:33 +0800 Subject: [PATCH] Revert "Fix incorrect sort link with `.profile` repository (#26374)" This reverts commit 3a42743b3afbb56209364f77b887b6b0499062cb. --- routers/web/user/profile.go | 2 +- templates/explore/repo_search.tmpl | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/routers/web/user/profile.go b/routers/web/user/profile.go index 87505b94b19c..fe67f955dbcb 100644 --- a/routers/web/user/profile.go +++ b/routers/web/user/profile.go @@ -79,7 +79,7 @@ func prepareUserProfileTabData(ctx *context.Context, showPrivate bool, profileGi // if there is a profile readme, default to "overview" page, otherwise, default to "repositories" page tab := ctx.FormString("tab") if tab == "" { - if profileReadme != nil { + if profileReadme != nil && !(ctx.Req.Form.Has("q") || ctx.Req.Form.Has("sort") || ctx.Req.Form.Has("language")) { tab = "overview" } else { tab = "repositories" diff --git a/templates/explore/repo_search.tmpl b/templates/explore/repo_search.tmpl index c056662fb89c..6e150dc7f2ac 100644 --- a/templates/explore/repo_search.tmpl +++ b/templates/explore/repo_search.tmpl @@ -19,18 +19,18 @@ {{svg "octicon-triangle-down" 14 "dropdown icon"}}