diff --git a/README.md b/README.md index 3e7b5962431..275c2b27753 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?bra ![](https://github.com/gogits/gogs/blob/master/public/img/gogs-large-resize.png?raw=true) -##### Current version: 0.8.23 +##### Current version: 0.8.24 | Web | UI | Preview | |:-------------:|:-------:|:-------:| diff --git a/gogs.go b/gogs.go index f281217fcfe..97c840d9c37 100644 --- a/gogs.go +++ b/gogs.go @@ -17,7 +17,7 @@ import ( "github.com/gogits/gogs/modules/setting" ) -const APP_VER = "0.8.23.0126" +const APP_VER = "0.8.24.0128" func init() { runtime.GOMAXPROCS(runtime.NumCPU()) diff --git a/models/pull.go b/models/pull.go index 2fe7d1fe37b..47d80473a05 100644 --- a/models/pull.go +++ b/models/pull.go @@ -525,11 +525,11 @@ func AddTestPullRequestTask(repoID int64, branch string) { } } -func ChangeUsernameInPullRequests(oldUserName, newUserName string) (error) { +func ChangeUsernameInPullRequests(oldUserName, newUserName string) error { pr := PullRequest{ - HeadUserName : newUserName, + HeadUserName: strings.ToLower(newUserName), } - _, err := x.Cols("head_user_name").Where("head_user_name = ?", oldUserName).Update(pr) + _, err := x.Cols("head_user_name").Where("head_user_name = ?", strings.ToLower(oldUserName)).Update(pr) return err } diff --git a/models/user.go b/models/user.go index 5d8075dbd15..31ac1e22dc3 100644 --- a/models/user.go +++ b/models/user.go @@ -599,12 +599,12 @@ func ChangeUserName(u *User, newUserName string) (err error) { return ErrUserAlreadyExist{newUserName} } - err = ChangeUsernameInPullRequests(u.LowerName, newUserName) + err = ChangeUsernameInPullRequests(u.Name, newUserName) if err != nil { - return err + return fmt.Errorf("ChangeUsernameInPullRequests: %v", err) } - return os.Rename(UserPath(u.LowerName), UserPath(newUserName)) + return os.Rename(UserPath(u.Name), UserPath(newUserName)) } func updateUser(e Engine, u *User) error { diff --git a/templates/.VERSION b/templates/.VERSION index fb318e0da17..677deac14ed 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.8.23.0126 \ No newline at end of file +0.8.24.0128 \ No newline at end of file diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl index 410aef797ac..c037b0ad139 100644 --- a/templates/user/profile.tmpl +++ b/templates/user/profile.tmpl @@ -60,7 +60,7 @@ {{if .Orgs}}
  • {{range .Orgs}} - + {{end}}
  • {{end}}