mirror of
https://github.com/go-gitea/gitea.git
synced 2025-06-21 13:38:00 +02:00
Bug fix
This commit is contained in:
@ -6,6 +6,7 @@ package repo
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/url"
|
||||
|
||||
"github.com/codegangsta/martini"
|
||||
|
||||
@ -35,7 +36,9 @@ func Issues(ctx *middleware.Context) {
|
||||
var posterId int64 = 0
|
||||
if ctx.Query("type") == "created_by" {
|
||||
if !ctx.IsSigned {
|
||||
ctx.SetCookie("redirect_to", "/"+url.QueryEscape(ctx.Req.RequestURI))
|
||||
ctx.Redirect("/user/login/", 302)
|
||||
return
|
||||
}
|
||||
posterId = ctx.User.Id
|
||||
ctx.Data["ViewType"] = "created_by"
|
||||
|
@ -85,9 +85,11 @@ func Single(ctx *middleware.Context, params martini.Params) {
|
||||
ctx.Data["Branches"] = brs
|
||||
|
||||
var commitId string
|
||||
if !models.IsBranchExist(userName, repoName, branchName) {
|
||||
isViewBranch := models.IsBranchExist(userName, repoName, branchName)
|
||||
if !isViewBranch {
|
||||
commitId = branchName
|
||||
}
|
||||
ctx.Data["IsViewBranch"] = isViewBranch
|
||||
|
||||
repoFile, err := models.GetTargetFile(userName, repoName,
|
||||
branchName, commitId, treename)
|
||||
|
Reference in New Issue
Block a user