diff options
Diffstat (limited to 'modules/middleware/repo.go')
-rw-r--r-- | modules/middleware/repo.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go index f0a46b6dad..c8e1aaee72 100644 --- a/modules/middleware/repo.go +++ b/modules/middleware/repo.go @@ -102,9 +102,17 @@ func RepoAssignment(redirect bool, args ...bool) martini.Handler { ctx.Repo.HasAccess = true ctx.Data["HasAccess"] = true + if repo.IsMirror { + ctx.Repo.Mirror, err = models.GetMirror(repo.Id) + if err != nil { + ctx.Handle(500, "RepoAssignment(GetMirror)", err) + return + } + ctx.Data["MirrorInterval"] = ctx.Repo.Mirror.Interval + } + repo.NumOpenIssues = repo.NumIssues - repo.NumClosedIssues ctx.Repo.Repository = repo - ctx.Data["IsBareRepo"] = ctx.Repo.Repository.IsBare gitRepo, err := git.OpenRepository(models.RepoPath(userName, repoName)) |