aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-08-10 20:11:18 -0700
committerUnknwon <joe2010xtmf@163.com>2014-08-10 20:11:18 -0700
commit5fbf8531e6a2b74ebc9dd2a5967e82a8c9216c7a (patch)
tree8c657d037a5c87ec13cc828244ae30d3fe1168ab /modules
parent7af7584d25f48309a70083c30805ebb8454611f0 (diff)
downloadgitea-5fbf8531e6a2b74ebc9dd2a5967e82a8c9216c7a.tar.gz
gitea-5fbf8531e6a2b74ebc9dd2a5967e82a8c9216c7a.zip
Finish new home page of organization
Diffstat (limited to 'modules')
-rw-r--r--modules/middleware/auth.go2
-rw-r--r--modules/middleware/repo.go10
2 files changed, 5 insertions, 7 deletions
diff --git a/modules/middleware/auth.go b/modules/middleware/auth.go
index 5862787b34..37e3aec454 100644
--- a/modules/middleware/auth.go
+++ b/modules/middleware/auth.go
@@ -5,7 +5,6 @@
package middleware
import (
- "fmt"
"net/url"
"strings"
@@ -44,7 +43,6 @@ func Toggle(options *ToggleOptions) macaron.Handler {
}
if options.SignInRequire {
- fmt.Println(ctx.User.IsActive, setting.Service.RegisterEmailConfirm)
if !ctx.IsSigned {
// Ignore watch repository operation.
if strings.HasSuffix(ctx.Req.RequestURI, "watch") {
diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go
index e1c5c68c75..929850d202 100644
--- a/modules/middleware/repo.go
+++ b/modules/middleware/repo.go
@@ -246,17 +246,17 @@ func RepoAssignment(redirect bool, args ...bool) macaron.Handler {
}
// repo is bare and display enable
- if displayBare && ctx.Repo.Repository.IsBare {
+ if ctx.Repo.Repository.IsBare {
log.Debug("Bare repository: %s", ctx.Repo.RepoLink)
- ctx.HTML(200, "repo/bare")
+ if displayBare {
+ ctx.HTML(200, "repo/bare")
+ }
return
}
if ctx.IsSigned {
ctx.Data["IsWatchingRepo"] = models.IsWatching(ctx.User.Id, repo.Id)
- }
- if ctx.Repo.Repository.IsBare {
- return
+ ctx.Data["IsStaringRepo"] = models.IsStaring(ctx.User.Id, repo.Id)
}
ctx.Data["TagName"] = ctx.Repo.TagName