]> source.dussan.org Git - gitea.git/commitdiff
Bug fix
authorUnknown <joe2010xtmf@163.com>
Thu, 20 Mar 2014 06:25:21 +0000 (02:25 -0400)
committerUnknown <joe2010xtmf@163.com>
Thu, 20 Mar 2014 06:25:21 +0000 (02:25 -0400)
modules/mailer/mailer.go
modules/middleware/repo.go

index 3823e01fa66e6169d5211a5db2d0b6d80e7a1e1d..150607f8c404e449f2950fae93df7dd859bfe7c9 100644 (file)
@@ -57,9 +57,9 @@ func processMailQueue() {
                                        info = ", info: " + msg.Info
                                }
                                log.Error(fmt.Sprintf("Async sent email %d succeed, not send emails: %s%s err: %s", num, tos, info, err))
-                               return
+                       } else {
+                               log.Trace(fmt.Sprintf("Async sent email %d succeed, sent emails: %s%s", num, tos, info))
                        }
-                       log.Trace(fmt.Sprintf("Async sent email %d succeed, sent emails: %s%s", num, tos, info))
                }
        }
 }
index f0cab8e895de7972f11efc3629f23c3562b8a0a2..b25c942316805175dda44baf097da035bd5ca675 100644 (file)
@@ -65,9 +65,11 @@ func RepoAssignment(redirect bool) martini.Handler {
                }
 
                ctx.Repo.IsValid = true
-               ctx.Repo.IsWatching = models.IsWatching(ctx.User.Id, repo.Id)
+               if ctx.User != nil {
+                       ctx.Repo.IsWatching = models.IsWatching(ctx.User.Id, repo.Id)
+               }
                ctx.Repo.Repository = repo
-               ctx.Repo.CloneLink.SSH = fmt.Sprintf("git@%s:%s/%s.git", base.Domain, ctx.User.LowerName, repo.LowerName)
+               ctx.Repo.CloneLink.SSH = fmt.Sprintf("git@%s:%s/%s.git", base.Domain, user.LowerName, repo.LowerName)
 
                ctx.Data["IsRepositoryValid"] = true
                ctx.Data["Repository"] = repo