From 423b1c69be7828c331a47467b66217d190e916b9 Mon Sep 17 00:00:00 2001 From: Don Bowman Date: Wed, 8 Apr 2015 00:44:38 +0000 Subject: [PATCH 01/18] don't set mime type to text/plain. This will break serving e.g. raw images, html, etc According to http://golang.org/pkg/net/http/#DetectContentType "If the Header does not contain a Content-Type line, Write adds a Content-Type set to the result of passing the initial 512 bytes of written data to DetectContentType." --- routers/repo/download.go | 1 - 1 file changed, 1 deletion(-) diff --git a/routers/repo/download.go b/routers/repo/download.go index c5e18e005b..b1c5fbc84d 100644 --- a/routers/repo/download.go +++ b/routers/repo/download.go @@ -27,7 +27,6 @@ func ServeBlob(ctx *middleware.Context, blob *git.Blob) error { _, isTextFile := base.IsTextFile(buf) _, isImageFile := base.IsImageFile(buf) - ctx.Resp.Header().Set("Content-Type", "text/plain") if !isTextFile && !isImageFile { ctx.Resp.Header().Set("Content-Disposition", "attachment; filename="+path.Base(ctx.Repo.TreeName)) ctx.Resp.Header().Set("Content-Transfer-Encoding", "binary") From 81e6173356f94360217822b8104e6d3afac628b0 Mon Sep 17 00:00:00 2001 From: Don Bowman Date: Wed, 8 Apr 2015 22:25:47 +0000 Subject: [PATCH 02/18] remove blackfriday.EXTENSION_HARD_LINE_BREAK from options. --- modules/base/markdown.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/base/markdown.go b/modules/base/markdown.go index d06e1338e7..e860f9705c 100644 --- a/modules/base/markdown.go +++ b/modules/base/markdown.go @@ -198,7 +198,7 @@ func RenderRawMarkdown(body []byte, urlPrefix string) []byte { extensions |= blackfriday.EXTENSION_FENCED_CODE extensions |= blackfriday.EXTENSION_AUTOLINK extensions |= blackfriday.EXTENSION_STRIKETHROUGH - extensions |= blackfriday.EXTENSION_HARD_LINE_BREAK + //extensions |= blackfriday.EXTENSION_HARD_LINE_BREAK extensions |= blackfriday.EXTENSION_SPACE_HEADERS extensions |= blackfriday.EXTENSION_NO_EMPTY_LINE_BEFORE_BLOCK From f3aab5dbe30f8e6a1032b524315f7fd37c3e0b24 Mon Sep 17 00:00:00 2001 From: James Date: Tue, 28 Apr 2015 11:59:05 -0400 Subject: [PATCH 03/18] Add full name field to admin's user edit page (fixes #1130) --- modules/auth/admin.go | 1 + routers/admin/users.go | 1 + templates/admin/user/edit.tmpl | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/modules/auth/admin.go b/modules/auth/admin.go index e6cc82cd34..a95b83de6a 100644 --- a/modules/auth/admin.go +++ b/modules/auth/admin.go @@ -11,6 +11,7 @@ import ( ) type AdminEditUserForm struct { + FullName string `form:"fullname" binding:"MaxSize(100)"` Email string `binding:"Required;Email;MaxSize(50)"` Password string `binding:"OmitEmpty;MinSize(6);MaxSize(255)"` Website string `binding:"MaxSize(50)"` diff --git a/routers/admin/users.go b/routers/admin/users.go index ddcca6390e..12c52236f9 100644 --- a/routers/admin/users.go +++ b/routers/admin/users.go @@ -185,6 +185,7 @@ func EditUserPost(ctx *middleware.Context, form auth.AdminEditUserForm) { u.EncodePasswd() } + u.FullName = form.FullName u.Email = form.Email u.Website = form.Website u.Location = form.Location diff --git a/templates/admin/user/edit.tmpl b/templates/admin/user/edit.tmpl index bdc0e3343f..4f4cc727ab 100644 --- a/templates/admin/user/edit.tmpl +++ b/templates/admin/user/edit.tmpl @@ -32,6 +32,10 @@ +
+ + +
From 5c63e1015d54098e56652f07d4ce2861e52e75f9 Mon Sep 17 00:00:00 2001 From: mrburns Date: Fri, 8 May 2015 10:20:27 +0200 Subject: [PATCH 04/18] Add app sub url for color picker js lib inclusion Currently, the js file doesn't take into account the possibility of a sub url being used (wich is my case :) wich prevents its inclusion. --- templates/repo/issue/list.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl index 0c817bc1d8..b64d8b81d7 100644 --- a/templates/repo/issue/list.tmpl +++ b/templates/repo/issue/list.tmpl @@ -96,7 +96,7 @@
- +