Browse Source

editor: fix compile error

pull/4240/head
Unknwon 8 years ago
parent
commit
25cf755f30
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
  1. 12
      routers/repo/editor.go

12
routers/repo/editor.go

@ -279,8 +279,8 @@ func editFilePost(ctx *context.Context, f form.EditRepoFile, isNewFile bool) {
return return
} }
if form.IsNewBrnach() && ctx.Repo.PullRequest.Allowed { if f.IsNewBrnach() && ctx.Repo.PullRequest.Allowed {
ctx.Redirect(ctx.Repo.PullRequestURL(oldBranchName, form.NewBranchName)) ctx.Redirect(ctx.Repo.PullRequestURL(oldBranchName, f.NewBranchName))
} else { } else {
ctx.Redirect(ctx.Repo.RepoLink + "/src/" + branchName + "/" + template.EscapePound(f.TreePath)) ctx.Redirect(ctx.Repo.RepoLink + "/src/" + branchName + "/" + template.EscapePound(f.TreePath))
} }
@ -382,8 +382,8 @@ func DeleteFilePost(ctx *context.Context, f form.DeleteRepoFile) {
return return
} }
if form.IsNewBrnach() && ctx.Repo.PullRequest.Allowed { if f.IsNewBrnach() && ctx.Repo.PullRequest.Allowed {
ctx.Redirect(ctx.Repo.PullRequestURL(oldBranchName, form.NewBranchName)) ctx.Redirect(ctx.Repo.PullRequestURL(oldBranchName, f.NewBranchName))
} else { } else {
ctx.Flash.Success(ctx.Tr("repo.editor.file_delete_success", ctx.Repo.TreePath)) ctx.Flash.Success(ctx.Tr("repo.editor.file_delete_success", ctx.Repo.TreePath))
ctx.Redirect(ctx.Repo.RepoLink + "/src/" + branchName) ctx.Redirect(ctx.Repo.RepoLink + "/src/" + branchName)
@ -503,8 +503,8 @@ func UploadFilePost(ctx *context.Context, f form.UploadRepoFile) {
return return
} }
if form.IsNewBrnach() && ctx.Repo.PullRequest.Allowed { if f.IsNewBrnach() && ctx.Repo.PullRequest.Allowed {
ctx.Redirect(ctx.Repo.PullRequestURL(oldBranchName, form.NewBranchName)) ctx.Redirect(ctx.Repo.PullRequestURL(oldBranchName, f.NewBranchName))
} else { } else {
ctx.Redirect(ctx.Repo.RepoLink + "/src/" + branchName + "/" + f.TreePath) ctx.Redirect(ctx.Repo.RepoLink + "/src/" + branchName + "/" + f.TreePath)
} }

Loading…
Cancel
Save