Browse Source

work on #784

tags/v0.9.99
Unknwon 9 years ago
parent
commit
3ea1443885
3 changed files with 5 additions and 3 deletions
  1. 1
    1
      gogs.go
  2. 3
    1
      models/repo.go
  3. 1
    1
      templates/.VERSION

+ 1
- 1
gogs.go View File

@@ -17,7 +17,7 @@ import (
"github.com/gogits/gogs/modules/setting"
)

const APP_VER = "0.5.10.1229 Beta"
const APP_VER = "0.5.10.0102 Beta"

func init() {
runtime.GOMAXPROCS(runtime.NumCPU())

+ 3
- 1
models/repo.go View File

@@ -829,6 +829,8 @@ func TransferOwnership(u *User, newOwner string, repo *Repository) error {

// ChangeRepositoryName changes all corresponding setting from old repository name to new one.
func ChangeRepositoryName(userName, oldRepoName, newRepoName string) (err error) {
userName = strings.ToLower(userName)
oldRepoName = strings.ToLower(oldRepoName)
newRepoName = strings.ToLower(newRepoName)
if !IsLegalName(newRepoName) {
return ErrRepoNameIllegal
@@ -836,7 +838,7 @@ func ChangeRepositoryName(userName, oldRepoName, newRepoName string) (err error)

// Update accesses.
accesses := make([]Access, 0, 10)
if err = x.Find(&accesses, &Access{RepoName: strings.ToLower(userName + "/" + oldRepoName)}); err != nil {
if err = x.Find(&accesses, &Access{RepoName: userName + "/" + oldRepoName}); err != nil {
return err
}


+ 1
- 1
templates/.VERSION View File

@@ -1 +1 @@
0.5.10.1229 Beta
0.5.10.0102 Beta

Loading…
Cancel
Save