diff options
author | Unknwon <u@gogs.io> | 2015-12-19 22:07:06 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-12-19 22:07:06 -0500 |
commit | 5ff6eedf5edaae0748aa0a80d682a441bbbb556d (patch) | |
tree | cc1d697559e8addb699173d28f2b1530df5d430b /routers/repo | |
parent | 53eb37d5292942e8f6d667f9a6fb9d35455d2967 (diff) | |
download | gitea-5ff6eedf5edaae0748aa0a80d682a441bbbb556d.tar.gz gitea-5ff6eedf5edaae0748aa0a80d682a441bbbb556d.zip |
#2251 fix button name
Diffstat (limited to 'routers/repo')
-rw-r--r-- | routers/repo/issue.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go index 45e63dd9c3..a4efb68024 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -51,6 +51,8 @@ func MustEnablePulls(ctx *middleware.Context) { if !ctx.Repo.Repository.EnablePulls { ctx.Handle(404, "MustEnablePulls", nil) } + + ctx.Data["HasForkedRepo"] = ctx.IsSigned && ctx.User.HasForkedRepo(ctx.Repo.Repository.ID) } func RetrieveLabels(ctx *middleware.Context) { @@ -69,9 +71,12 @@ func RetrieveLabels(ctx *middleware.Context) { func Issues(ctx *middleware.Context) { isPullList := ctx.Params(":type") == "pulls" if isPullList { + MustEnablePulls(ctx) + if ctx.Written() { + return + } ctx.Data["Title"] = ctx.Tr("repo.pulls") ctx.Data["PageIsPullList"] = true - ctx.Data["HasForkedRepo"] = ctx.IsSigned && ctx.User.HasForkedRepo(ctx.Repo.Repository.ID) } else { MustEnableIssues(ctx) |