mirror of
				https://gitcode.com/gitea/gitea.git
				synced 2025-10-26 05:04:27 +08:00 
			
		
		
		
	Ensure settings for Service and Mailer are read on the install page (#15943)
* 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>
This commit is contained in:
		| @ -1190,3 +1190,9 @@ func NewServices() { | |||||||
| 	newProject() | 	newProject() | ||||||
| 	newMimeTypeMap() | 	newMimeTypeMap() | ||||||
| } | } | ||||||
|  |  | ||||||
|  | // NewServicesForInstall initializes the services for install | ||||||
|  | func NewServicesForInstall() { | ||||||
|  | 	newService() | ||||||
|  | 	newMailService() | ||||||
|  | } | ||||||
|  | |||||||
| @ -28,6 +28,7 @@ func PreloadSettings(ctx context.Context) bool { | |||||||
| 			log.Info("SQLite3 Supported") | 			log.Info("SQLite3 Supported") | ||||||
| 		} | 		} | ||||||
| 		setting.InitDBConfig() | 		setting.InitDBConfig() | ||||||
|  | 		setting.NewServicesForInstall() | ||||||
| 		svg.Init() | 		svg.Init() | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 zeripath
					zeripath