diff options
author | zeripath <art27@cantab.net> | 2022-08-19 01:53:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-18 20:53:31 -0400 |
commit | 68f3aaee809eb1c6a99045a608a10d3707ce2557 (patch) | |
tree | a8863226839b11df4c139020a2a5c806b1de2034 /routers | |
parent | 3d12018a74856313430dd8635d94c50d891f4528 (diff) | |
download | gitea-68f3aaee809eb1c6a99045a608a10d3707ce2557.tar.gz gitea-68f3aaee809eb1c6a99045a608a10d3707ce2557.zip |
Remove calls to load Mirrors in user.Dashboard (#20855)
Whilst looking at #20840 I noticed that the Mirrors data doesn't appear
to be being used therefore we can remove this and in fact none of the
related code is used elsewhere so it can also be removed.
Related #20840
Related #20804
Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'routers')
-rw-r--r-- | routers/web/user/home.go | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/routers/web/user/home.go b/routers/web/user/home.go index 5e17239e34..f28a684054 100644 --- a/routers/web/user/home.go +++ b/routers/web/user/home.go @@ -100,39 +100,6 @@ func Dashboard(ctx *context.Context) { } var err error - var mirrors []*repo_model.Repository - if ctxUser.IsOrganization() { - var env organization.AccessibleReposEnvironment - if ctx.Org.Team != nil { - env = organization.OrgFromUser(ctxUser).AccessibleTeamReposEnv(ctx.Org.Team) - } else { - env, err = organization.AccessibleReposEnv(ctx, organization.OrgFromUser(ctxUser), ctx.Doer.ID) - if err != nil { - ctx.ServerError("AccessibleReposEnv", err) - return - } - } - mirrors, err = env.MirrorRepos() - if err != nil { - ctx.ServerError("env.MirrorRepos", err) - return - } - } else { - mirrors, err = repo_model.GetUserMirrorRepositories(ctxUser.ID) - if err != nil { - ctx.ServerError("GetUserMirrorRepositories", err) - return - } - } - ctx.Data["MaxShowRepoNum"] = setting.UI.User.RepoPagingNum - - if err := repo_model.MirrorRepositoryList(mirrors).LoadAttributes(); err != nil { - ctx.ServerError("MirrorRepositoryList.LoadAttributes", err) - return - } - ctx.Data["MirrorCount"] = len(mirrors) - ctx.Data["Mirrors"] = mirrors - ctx.Data["Feeds"], err = models.GetFeeds(ctx, models.GetFeedsOptions{ RequestedUser: ctxUser, RequestedTeam: ctx.Org.Team, |