Merge branch 'master' into advanced-permissions-phase-1

Этот коммит содержится в:
Martin Kraft
2018-03-23 09:08:49 -04:00
родитель 37f0e5e0eb 87762ae62e
Коммит 5fa1b35819
53 изменённых файлов: 2849 добавлений и 164 удалений

Просмотреть файл

@@ -66,6 +66,8 @@ type App struct {
clientLicenseValue atomic.Value
licenseListeners map[string]func()
timezones atomic.Value
siteURL string
newStore func() store.Store
@@ -127,6 +129,9 @@ func New(options ...Option) (outApp *App, outErr error) {
return nil, err
}
app.EnableConfigWatch()
app.LoadTimezones()
if err := utils.InitTranslations(app.Config().LocalizationSettings); err != nil {
return nil, errors.Wrapf(err, "unable to load Mattermost translation files")
}
@@ -439,7 +444,11 @@ func (a *App) WaitForGoroutines() {
}
func (a *App) HTMLTemplates() *template.Template {
return a.htmlTemplateWatcher.Templates()
if a.htmlTemplateWatcher != nil {
return a.htmlTemplateWatcher.Templates()
}
return nil
}
func (a *App) HTTPClient(trustURLs bool) *http.Client {