From 4deb87634370c33e4890db47bd64196cff0a05b9 Mon Sep 17 00:00:00 2001
From: Unknwon <u@gogs.io>
Date: Thu, 28 Jan 2016 06:07:16 -0500
Subject: [PATCH] Minor fix for #2494

- Change tooltip size from mini to tiny in profile page
---
 README.md                   | 2 +-
 gogs.go                     | 2 +-
 models/pull.go              | 6 +++---
 models/user.go              | 6 +++---
 templates/.VERSION          | 2 +-
 templates/user/profile.tmpl | 2 +-
 6 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/README.md b/README.md
index 3e7b59624..275c2b277 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 f281217fc..97c840d9c 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 2fe7d1fe3..47d80473a 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 5d8075dbd..31ac1e22d 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 fb318e0da..677deac14 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 410aef797..c037b0ad1 100644
--- a/templates/user/profile.tmpl
+++ b/templates/user/profile.tmpl
@@ -60,7 +60,7 @@
 							{{if .Orgs}}
 							<li>
 								{{range .Orgs}}
-									<a href="{{.HomeLink}}"><img class="ui mini image poping up" src="{{.AvatarLink}}" data-content="{{.Name}}" data-position="top center" data-variation="mini inverted"></a>
+									<a href="{{.HomeLink}}"><img class="ui mini image poping up" src="{{.AvatarLink}}" data-content="{{.Name}}" data-position="top center" data-variation="tiny inverted"></a>
 								{{end}}
 							</li>
 							{{end}}