]> source.dussan.org Git - gitea.git/commitdiff
Ensure settings for Service and Mailer are read on the install page (#15943)
authorzeripath <art27@cantab.net>
Wed, 16 Jun 2021 23:32:57 +0000 (00:32 +0100)
committerGitHub <noreply@github.com>
Wed, 16 Jun 2021 23:32:57 +0000 (19:32 -0400)
* Ensure settings for Service and Mailer are read on the install page

NewContext does not set the mailer or service settings so add
a new function that will run this.

Fix #15894

Signed-off-by: Andrew Thornton <art27@cantab.net>
* placate lint

Signed-off-by: Andrew Thornton <art27@cantab.net>
modules/setting/setting.go
routers/install/setting.go

index 6e05df1ad99f2f011e03efed95d3f1b796b74645..d26c054cd79ddea4fef3cfc6e10cc441c7121bc6 100644 (file)
@@ -1190,3 +1190,9 @@ func NewServices() {
        newProject()
        newMimeTypeMap()
 }
+
+// NewServicesForInstall initializes the services for install
+func NewServicesForInstall() {
+       newService()
+       newMailService()
+}
index 50bb6aa355bfab0b4973de8b4526ae89cb31d8ce..53d166ba1de7f8714f4d95db1686e090f54f02d4 100644 (file)
@@ -28,6 +28,7 @@ func PreloadSettings(ctx context.Context) bool {
                        log.Info("SQLite3 Supported")
                }
                setting.InitDBConfig()
+               setting.NewServicesForInstall()
                svg.Init()
        }