summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-03-22 06:42:19 -0400
committerUnknown <joe2010xtmf@163.com>2014-03-22 06:42:19 -0400
commit7a1ff8636c01844a501dd9cdca2c436d1b7826b7 (patch)
tree80391757c6ed9f704c7b6eb0bd875b6ddd9b2898 /modules
parent76cd448e7925997b60a54e8d9431ffd0826cc24e (diff)
downloadgitea-7a1ff8636c01844a501dd9cdca2c436d1b7826b7.tar.gz
gitea-7a1ff8636c01844a501dd9cdca2c436d1b7826b7.zip
Add config option: Picture cache path
Diffstat (limited to 'modules')
-rw-r--r--modules/base/conf.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/base/conf.go b/modules/base/conf.go
index 863daca644..8c6ee62818 100644
--- a/modules/base/conf.go
+++ b/modules/base/conf.go
@@ -44,6 +44,9 @@ var (
CacheAdapter string
CacheConfig string
+ PictureService string
+ PictureRootPath string
+
LogMode string
LogConfig string
)
@@ -52,6 +55,7 @@ var Service struct {
RegisterEmailConfirm bool
DisenableRegisteration bool
RequireSignInView bool
+ EnableCacheAvatar bool
ActiveCodeLives int
ResetPwdCodeLives int
}
@@ -82,6 +86,7 @@ func newService() {
Service.ResetPwdCodeLives = Cfg.MustInt("service", "RESET_PASSWD_CODE_LIVE_MINUTES", 180)
Service.DisenableRegisteration = Cfg.MustBool("service", "DISENABLE_REGISTERATION", false)
Service.RequireSignInView = Cfg.MustBool("service", "REQUIRE_SIGNIN_VIEW", false)
+ Service.EnableCacheAvatar = Cfg.MustBool("service", "ENABLE_CACHE_AVATAR", false)
}
func newLogService() {
@@ -214,6 +219,9 @@ func NewConfigContext() {
SecretKey = Cfg.MustValue("security", "SECRET_KEY")
RunUser = Cfg.MustValue("", "RUN_USER")
+ PictureService = Cfg.MustValue("picture", "SERVICE")
+ PictureRootPath = Cfg.MustValue("picture", "PATH")
+
// Determine and create root git reposiroty path.
RepoRootPath = Cfg.MustValue("repository", "ROOT")
if err = os.MkdirAll(RepoRootPath, os.ModePerm); err != nil {