From 67a9416ae55ea765e3f405e00d89b0b8f3899330 Mon Sep 17 00:00:00 2001
From: Unknwon <joe2010xtmf@163.com>
Date: Thu, 12 Feb 2015 12:38:44 -0500
Subject: [PATCH] templates/user/auth/signin.tmpl: hide sign up prompt when
 registration is disabled #884

---
 gogs.go                         | 2 +-
 models/models.go                | 8 ++++----
 templates/.VERSION              | 2 +-
 templates/user/auth/signin.tmpl | 2 ++
 4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/gogs.go b/gogs.go
index eac5936218c2..76c6c71fc36a 100644
--- a/gogs.go
+++ b/gogs.go
@@ -17,7 +17,7 @@ import (
 	"github.com/gogits/gogs/modules/setting"
 )
 
-const APP_VER = "0.5.13.0211 Beta"
+const APP_VER = "0.5.13.0212 Beta"
 
 func init() {
 	runtime.GOMAXPROCS(runtime.NumCPU())
diff --git a/models/models.go b/models/models.go
index 3eeeabda3f63..35e803834ca7 100644
--- a/models/models.go
+++ b/models/models.go
@@ -15,7 +15,7 @@ import (
 	"github.com/go-xorm/xorm"
 	_ "github.com/lib/pq"
 
-	"github.com/gogits/gogs/models/migrations"
+	// "github.com/gogits/gogs/models/migrations"
 	"github.com/gogits/gogs/modules/setting"
 )
 
@@ -136,9 +136,9 @@ func NewEngine() (err error) {
 		return err
 	}
 
-	if err = migrations.Migrate(x); err != nil {
-		return err
-	}
+	// if err = migrations.Migrate(x); err != nil {
+	// 	return err
+	// }
 
 	if err = x.StoreEngine("InnoDB").Sync2(tables...); err != nil {
 		return fmt.Errorf("sync database struct error: %v\n", err)
diff --git a/templates/.VERSION b/templates/.VERSION
index 2aad3653cb46..6d13155b0231 100644
--- a/templates/.VERSION
+++ b/templates/.VERSION
@@ -1 +1 @@
-0.5.13.0211 Beta
\ No newline at end of file
+0.5.13.0212 Beta
\ No newline at end of file
diff --git a/templates/user/auth/signin.tmpl b/templates/user/auth/signin.tmpl
index 78d6febb80e4..455df63ac82e 100644
--- a/templates/user/auth/signin.tmpl
+++ b/templates/user/auth/signin.tmpl
@@ -26,10 +26,12 @@
                 <button class="btn btn-green btn-large btn-radius">{{.i18n.Tr "sign_in"}}</button>&nbsp;&nbsp;&nbsp;&nbsp;
                 {{if not .IsSocialLogin}}<a href="{{AppSubUrl}}/user/forget_password">{{.i18n.Tr "auth.forget_password"}}</a>{{end}}
             </div>
+            {{if .ShowRegistrationButton}}
             <div class="field">
                 <label></label>
                 <a href="{{AppSubUrl}}/user/sign_up">{{.i18n.Tr "auth.sign_up_now" | Str2html}}</a>
             </div>
+            {{end}}
             {{if and (not .IsSocialLogin) .OauthEnabled}}
             <hr/>
             <div id="sign-social" class="text-center social-buttons">