commit28a23b5a57
Author: Minecon724 <minecon724@noreply.git.m724.eu> Date: Sat Sep 13 11:57:09 2025 +0000 Add the form commit3fed792929
Author: Minecon724 <minecon724@noreply.git.m724.eu> Date: Sat Sep 13 11:56:59 2025 +0000 Add the config option
33 lines
856 B
Go
33 lines
856 B
Go
// Copyright 2023 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package setting
|
|
|
|
import "forgejo.org/modules/log"
|
|
|
|
type OtherConfig struct {
|
|
ShowFooterVersion bool
|
|
ShowFooterTemplateLoadTime bool
|
|
ShowFooterPoweredBy bool
|
|
EnableFeed bool
|
|
EnableSitemap bool
|
|
TermsOfServiceUrl string
|
|
PrivacyPolicyUrl string
|
|
}
|
|
|
|
var Other = OtherConfig{
|
|
ShowFooterVersion: true,
|
|
ShowFooterTemplateLoadTime: true,
|
|
ShowFooterPoweredBy: true,
|
|
EnableSitemap: true,
|
|
EnableFeed: true,
|
|
TermsOfServiceUrl: "",
|
|
PrivacyPolicyUrl: "",
|
|
}
|
|
|
|
func loadOtherFrom(rootCfg ConfigProvider) {
|
|
sec := rootCfg.Section("other")
|
|
if err := sec.MapTo(&Other); err != nil {
|
|
log.Fatal("Failed to map [other] settings: %v", err)
|
|
}
|
|
}
|