From 78defd238c939ff577041f2e7b95b2ae48a9fb27 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sat, 9 Aug 2014 17:25:02 -0700 Subject: Page: Manage social accounts --- modules/middleware/repo.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules/middleware') diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go index 16bd7defb8..e1c5c68c75 100644 --- a/modules/middleware/repo.go +++ b/modules/middleware/repo.go @@ -253,7 +253,10 @@ func RepoAssignment(redirect bool, args ...bool) macaron.Handler { } if ctx.IsSigned { - ctx.Repo.IsWatching = models.IsWatching(ctx.User.Id, repo.Id) + ctx.Data["IsWatchingRepo"] = models.IsWatching(ctx.User.Id, repo.Id) + } + if ctx.Repo.Repository.IsBare { + return } ctx.Data["TagName"] = ctx.Repo.TagName @@ -276,7 +279,6 @@ func RepoAssignment(redirect bool, args ...bool) macaron.Handler { ctx.Data["BranchName"] = ctx.Repo.BranchName ctx.Data["CommitId"] = ctx.Repo.CommitId - ctx.Data["IsWatchingRepo"] = ctx.Repo.IsWatching } } -- cgit v1.2.3