|
|
@@ -27,9 +27,11 @@ import (
|
|
|
)
|
|
|
|
|
|
const (
|
|
|
+ // INSTALL page template
|
|
|
INSTALL = "install"
|
|
|
)
|
|
|
|
|
|
+// checkRunMode check if it is runned or not in production
|
|
|
func checkRunMode() {
|
|
|
if setting.ProdMode {
|
|
|
macaron.Env = macaron.PROD
|
|
|
@@ -40,6 +42,7 @@ func checkRunMode() {
|
|
|
log.Info("Run Mode: %s", strings.Title(macaron.Env))
|
|
|
}
|
|
|
|
|
|
+// NewServices initializes new services
|
|
|
func NewServices() {
|
|
|
setting.NewServices()
|
|
|
mailer.NewContext()
|
|
|
@@ -96,6 +99,7 @@ func GlobalInit() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+// InstallInit initialize the install
|
|
|
func InstallInit(c *context.Context) {
|
|
|
if setting.InstallLock {
|
|
|
c.NotFound()
|
|
|
@@ -112,6 +116,7 @@ func InstallInit(c *context.Context) {
|
|
|
c.Data["DbOptions"] = dbOpts
|
|
|
}
|
|
|
|
|
|
+// Install shows install page
|
|
|
func Install(c *context.Context) {
|
|
|
f := form.Install{}
|
|
|
|
|
|
@@ -172,6 +177,7 @@ func Install(c *context.Context) {
|
|
|
c.Success(INSTALL)
|
|
|
}
|
|
|
|
|
|
+// InstallPost install gitote
|
|
|
func InstallPost(c *context.Context, f form.Install) {
|
|
|
c.Data["CurDbOption"] = f.DbType
|
|
|
|