From 7b907ed348595e45d2d69cdabf70bfbbbb41c3ee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20=C3=96stanb=C3=A4ck?=
 <cez81@users.noreply.github.com>
Date: Wed, 24 May 2017 02:27:08 +0200
Subject: [PATCH] Rename RepoCreationNum -> MaxCreationLimit (#1766)

---
 models/user.go       | 4 ++--
 routers/repo/repo.go | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/models/user.go b/models/user.go
index 5fe72f923..3aef510d7 100644
--- a/models/user.go
+++ b/models/user.go
@@ -211,8 +211,8 @@ func (u *User) HasForkedRepo(repoID int64) bool {
 	return has
 }
 
-// RepoCreationNum returns the number of repositories created by the user
-func (u *User) RepoCreationNum() int {
+// MaxCreationLimit returns the number of repositories a user is allowed to create
+func (u *User) MaxCreationLimit() int {
 	if u.MaxRepoCreation <= -1 {
 		return setting.Repository.MaxCreationLimit
 	}
diff --git a/routers/repo/repo.go b/routers/repo/repo.go
index e2e2dc7a3..8ebcee79c 100644
--- a/routers/repo/repo.go
+++ b/routers/repo/repo.go
@@ -93,7 +93,7 @@ func Create(ctx *context.Context) {
 func handleCreateError(ctx *context.Context, owner *models.User, err error, name string, tpl base.TplName, form interface{}) {
 	switch {
 	case models.IsErrReachLimitOfRepo(err):
-		ctx.RenderWithErr(ctx.Tr("repo.form.reach_limit_of_creation", owner.RepoCreationNum()), tpl, form)
+		ctx.RenderWithErr(ctx.Tr("repo.form.reach_limit_of_creation", owner.MaxCreationLimit()), tpl, form)
 	case models.IsErrRepoAlreadyExist(err):
 		ctx.Data["Err_RepoName"] = true
 		ctx.RenderWithErr(ctx.Tr("form.repo_name_been_taken"), tpl, form)