Merge branch 'master' into feature-tasklist

This commit is contained in:
bati11
2014-05-03 10:51:18 +09:00
229 changed files with 230088 additions and 1037 deletions

View File

@@ -118,7 +118,7 @@ trait IssuesControllerBase extends ControllerBase {
// notifications
Notifier().toNotify(repository, issueId, form.content.getOrElse("")){
Notifier.msgIssue(s"${baseUrl}/${owner}/${name}/issues/${issueId}")
Notifier.msgIssue(s"${context.baseUrl}/${owner}/${name}/issues/${issueId}")
}
redirect(s"/${owner}/${name}/issues/${issueId}")
@@ -273,6 +273,15 @@ trait IssuesControllerBase extends ControllerBase {
}
})
get("/:owner/:repository/_attached/:file")(referrersOnly { repository =>
defining(new java.io.File(Directory.getAttachedDir(repository.owner, repository.name), params("file"))){ file =>
if(file.exists) {
contentType = FileUtil.getMimeType(file)
file
} else NotFound
}
})
val assignedUserName = (key: String) => params.get(key) filter (_.trim != "")
val milestoneId: String => Option[Int] = (key: String) => params.get(key).flatMap(_.toIntOpt)
@@ -342,13 +351,13 @@ trait IssuesControllerBase extends ControllerBase {
case f =>
content foreach {
f.toNotify(repository, issueId, _){
Notifier.msgComment(s"${baseUrl}/${owner}/${name}/${
Notifier.msgComment(s"${context.baseUrl}/${owner}/${name}/${
if(issue.isPullRequest) "pull" else "issues"}/${issueId}#comment-${commentId}")
}
}
action foreach {
f.toNotify(repository, issueId, _){
Notifier.msgStatus(s"${baseUrl}/${owner}/${name}/issues/${issueId}")
Notifier.msgStatus(s"${context.baseUrl}/${owner}/${name}/issues/${issueId}")
}
}
}