diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/base/base.go | 2 | ||||
-rw-r--r-- | modules/mailer/mail.go | 3 | ||||
-rw-r--r-- | modules/middleware/repo.go | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/modules/base/base.go b/modules/base/base.go index c9875fb5..45e2151e 100644 --- a/modules/base/base.go +++ b/modules/base/base.go @@ -16,8 +16,6 @@ type ( TplName string ) -var GoGetMetas = make(map[string]bool) - // ExecPath returns the executable path. func ExecPath() (string, error) { file, err := exec.LookPath(os.Args[0]) diff --git a/modules/mailer/mail.go b/modules/mailer/mail.go index 456f8503..ca5618f1 100644 --- a/modules/mailer/mail.go +++ b/modules/mailer/mail.go @@ -7,6 +7,7 @@ package mailer import ( "fmt" "path" + "strings" "gopkg.in/macaron.v1" @@ -125,7 +126,7 @@ func SendIssueNotifyMail(u, owner *models.User, repo *models.Repository, issue * subject := fmt.Sprintf("[%s] %s (#%d)", repo.Name, issue.Name, issue.Index) content := fmt.Sprintf("%s<br>-<br> <a href=\"%s%s/%s/issues/%d\">View it on Gogs</a>.", - base.RenderSpecialLink([]byte(issue.Content), owner.Name+"/"+repo.Name, repo.ComposeMetas()), + base.RenderSpecialLink([]byte(strings.Replace(issue.Content, "\n", "<br>", -1)), owner.Name+"/"+repo.Name, repo.ComposeMetas()), setting.AppUrl, owner.Name, repo.Name, issue.Index) msg := NewMessage(tos, subject, content) msg.Info = fmt.Sprintf("Subject: %s, issue notify", subject) diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go index 9ceb9903..fb636d93 100644 --- a/modules/middleware/repo.go +++ b/modules/middleware/repo.go @@ -167,7 +167,7 @@ func RepoAssignment(args ...bool) macaron.Handler { ctx.Data["IsRepositoryOwner"] = ctx.Repo.IsOwner() ctx.Data["IsRepositoryAdmin"] = ctx.Repo.IsAdmin() ctx.Data["IsRepositoryPusher"] = ctx.Repo.IsPusher() - ctx.Data["CanPullRequest"] = ctx.Repo.IsAdmin() && repo.BaseRepo != nil && repo.BaseRepo.EnablePulls + ctx.Data["CanPullRequest"] = ctx.Repo.IsAdmin() && repo.BaseRepo != nil && repo.BaseRepo.AllowsPulls() ctx.Data["DisableSSH"] = setting.DisableSSH ctx.Data["CloneLink"] = repo.CloneLink() |