From 6f6f38e7c34baed7f0f6c5d9caf339ff8896dc6d Mon Sep 17 00:00:00 2001
From: Unknwon <u@gogs.io>
Date: Tue, 8 Sep 2015 09:09:40 -0400
Subject: [PATCH] #1603 suburl for comment attachments

---
 routers/repo/issue.go                  | 2 +-
 templates/repo/issue/view_content.tmpl | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/routers/repo/issue.go b/routers/repo/issue.go
index 019bb1d75..e242dd0e5 100644
--- a/routers/repo/issue.go
+++ b/routers/repo/issue.go
@@ -819,7 +819,7 @@ func NewComment(ctx *middleware.Context, form auth.CreateCommentForm) {
 			ctx.Handle(500, "ChangeStatus", err)
 			return
 		}
-		log.Trace("%s Issue[%d] status changed: %v", ctx.Req.RequestURI, issue.ID, !issue.IsClosed)
+		log.Trace("Issue[%d] status changed: %v", issue.ID, !issue.IsClosed)
 	}
 
 	ctx.Redirect(fmt.Sprintf("%s/issues/%d#%s", ctx.Repo.RepoLink, issue.Index, comment.HashTag()))
diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl
index 41b46c584..d258d3d0a 100644
--- a/templates/repo/issue/view_content.tmpl
+++ b/templates/repo/issue/view_content.tmpl
@@ -91,7 +91,7 @@
 					<div class="ui bottom attached segment">
 						<div class="ui small images">
 							{{range .Attachments}}
-						  <a target="_blank" href="/attachments/{{.UUID}}"><img class="ui image" src="/attachments/{{.UUID}}"></a>
+						  <a target="_blank" href="{{AppSubUrl}}/attachments/{{.UUID}}"><img class="ui image" src="{{AppSubUrl}}/attachments/{{.UUID}}"></a>
 						  {{end}}
 						</div>
 					</div>