mirror of https://github.com/gogs/gogs.git
Minor code fix
parent
39fdb0f9c4
commit
67380cf47b
|
@ -20,7 +20,7 @@ github.com/go-xorm/xorm = commit:3ad0b42
|
|||
github.com/gogits/chardet = commit:2404f77
|
||||
github.com/gogits/cron = commit:7f3990a
|
||||
github.com/gogits/git-module = commit:7129215
|
||||
github.com/gogits/go-gogs-client = commit:3693f6a
|
||||
github.com/gogits/go-gogs-client = commit:98046bb
|
||||
github.com/gogits/go-libravatar = commit:cd1abbd
|
||||
github.com/issue9/identicon = commit:d36b545
|
||||
github.com/jaytaylor/html2text = commit:52d9b78
|
||||
|
|
|
@ -3,7 +3,7 @@ Gogs - Go Git Service [
|
||||
|
||||
##### Current tip version: 0.9.103 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions or submit a task on [alpha stage automated binary building system](https://build.gogs.io/))
|
||||
##### Current tip version: 0.9.104 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions or submit a task on [alpha stage automated binary building system](https://build.gogs.io/))
|
||||
|
||||
| Web | UI | Preview |
|
||||
|:-------------:|:-------:|:-------:|
|
||||
|
|
|
@ -45,7 +45,7 @@ imports:
|
|||
- name: github.com/gogits/git-module
|
||||
version: 71292151e50d262429f29515dd077d7f5beb8c66
|
||||
- name: github.com/gogits/go-gogs-client
|
||||
version: 3693f6a1a71302d146590845e35fc7fd530aae4e
|
||||
version: 98046bb98061fc6baa5bb86359af0b7c300d384a
|
||||
- name: github.com/gogits/go-libravatar
|
||||
version: cd1abbd55d09b793672732a7a1dfdaa12a40dfd0
|
||||
- name: github.com/issue9/identicon
|
||||
|
|
2
gogs.go
2
gogs.go
|
@ -17,7 +17,7 @@ import (
|
|||
"github.com/gogits/gogs/modules/setting"
|
||||
)
|
||||
|
||||
const APP_VER = "0.9.103.1221"
|
||||
const APP_VER = "0.9.104.1221"
|
||||
|
||||
func init() {
|
||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||
|
|
|
@ -23,6 +23,7 @@ import (
|
|||
"github.com/Unknwon/com"
|
||||
"github.com/go-xorm/xorm"
|
||||
"github.com/nfnt/resize"
|
||||
"golang.org/x/crypto/pbkdf2"
|
||||
|
||||
"github.com/gogits/git-module"
|
||||
api "github.com/gogits/go-gogs-client"
|
||||
|
@ -32,8 +33,6 @@ import (
|
|||
"github.com/gogits/gogs/modules/log"
|
||||
"github.com/gogits/gogs/modules/markdown"
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
|
||||
"golang.org/x/crypto/pbkdf2"
|
||||
)
|
||||
|
||||
type UserType int
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -96,10 +96,8 @@ func NewFuncMap() []template.FuncMap {
|
|||
"ShortSha": base.ShortSha,
|
||||
"MD5": base.EncodeMD5,
|
||||
"ActionContent2Commits": ActionContent2Commits,
|
||||
"EscapePound": func(str string) string {
|
||||
return strings.NewReplacer("%", "%25", "#", "%23", " ", "%20", "?", "%3F").Replace(str)
|
||||
},
|
||||
"RenderCommitMessage": RenderCommitMessage,
|
||||
"EscapePound": EscapePound,
|
||||
"RenderCommitMessage": RenderCommitMessage,
|
||||
"ThemeColorMetaTag": func() string {
|
||||
return setting.UI.ThemeColorMetaTag
|
||||
},
|
||||
|
@ -268,6 +266,10 @@ func ActionContent2Commits(act Actioner) *models.PushCommits {
|
|||
return push
|
||||
}
|
||||
|
||||
func EscapePound(str string) string {
|
||||
return strings.NewReplacer("%", "%25", "#", "%23", " ", "%20", "?", "%3F").Replace(str)
|
||||
}
|
||||
|
||||
func DiffTypeToStr(diffType int) string {
|
||||
diffTypes := map[int]string{
|
||||
1: "add", 2: "modify", 3: "del", 4: "rename",
|
||||
|
|
|
@ -264,7 +264,7 @@ func editFilePost(ctx *context.Context, form auth.EditRepoFileForm, isNewFile bo
|
|||
return
|
||||
}
|
||||
|
||||
ctx.Redirect(ctx.Repo.RepoLink + "/src/" + branchName + "/" + strings.NewReplacer("%", "%25", "#", "%23", " ", "%20", "?", "%3F").Replace(form.TreePath))
|
||||
ctx.Redirect(ctx.Repo.RepoLink + "/src/" + branchName + "/" + template.EscapePound(form.TreePath))
|
||||
}
|
||||
|
||||
func EditFilePost(ctx *context.Context, form auth.EditRepoFileForm) {
|
||||
|
|
|
@ -1 +1 @@
|
|||
0.9.103.1221
|
||||
0.9.104.1221
|
Loading…
Reference in New Issue