From e498069fd5ab8e532761aec2be1eb5e0fd2b4bd3 Mon Sep 17 00:00:00 2001 From: 0ko <0ko@noreply.codeberg.org> Date: Sun, 31 Mar 2024 10:52:24 +0500 Subject: [PATCH] Update checker setting updates - revert https://codeberg.org/forgejo/forgejo/commit/c53f802778c1951e0804507eec995bca37f1b09b - enable by default on install page - save checkbox state between form submissions Resolves https://codeberg.org/forgejo/forgejo/issues/2859 --- routers/install/install.go | 1 + services/cron/tasks_extended.go | 2 +- templates/install.tmpl | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/routers/install/install.go b/routers/install/install.go index 5030306d89..d5503db31f 100644 --- a/routers/install/install.go +++ b/routers/install/install.go @@ -159,6 +159,7 @@ func Install(ctx *context.Context) { form.DefaultAllowCreateOrganization = setting.Service.DefaultAllowCreateOrganization form.DefaultEnableTimetracking = setting.Service.DefaultEnableTimetracking form.NoReplyAddress = setting.Service.NoReplyAddress + form.EnableUpdateChecker = true form.PasswordAlgorithm = hash.ConfigHashAlgorithm(setting.PasswordHashAlgo) middleware.AssignForm(form, ctx.Data) diff --git a/services/cron/tasks_extended.go b/services/cron/tasks_extended.go index 569e8fbd24..e1ba5274e6 100644 --- a/services/cron/tasks_extended.go +++ b/services/cron/tasks_extended.go @@ -147,7 +147,7 @@ func registerUpdateGiteaChecker() { } RegisterTaskFatal("update_checker", &UpdateCheckerConfig{ BaseConfig: BaseConfig{ - Enabled: false, + Enabled: true, RunAtStart: false, Schedule: "@every 168h", }, diff --git a/templates/install.tmpl b/templates/install.tmpl index 6bb37d0a0c..d49de33a3f 100644 --- a/templates/install.tmpl +++ b/templates/install.tmpl @@ -150,7 +150,7 @@