aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorBwko <bouwko@gmail.com>2017-01-23 02:19:50 +0100
committerLunny Xiao <xiaolunwen@gmail.com>2017-01-23 09:19:50 +0800
commit74ed6dc3ad830d308a032fe213e9dfe83f954ffc (patch)
tree7b1af731b492d46785d162ca778e1b756b45850f /modules
parent1257d43e147efd985e740e0ec59f2e5b015e5b7d (diff)
downloadgitea-74ed6dc3ad830d308a032fe213e9dfe83f954ffc.tar.gz
gitea-74ed6dc3ad830d308a032fe213e9dfe83f954ffc.zip
Add option to app.ini to enable local import paths (#724)
Diffstat (limited to 'modules')
-rw-r--r--modules/setting/setting.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 16177e889b..c07b584b81 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -114,6 +114,7 @@ var (
CookieRememberName string
ReverseProxyAuthUser string
MinPasswordLength int
+ ImportLocalPaths bool
// Database settings
UseSQLite3 bool
@@ -712,6 +713,7 @@ please consider changing to GITEA_CUSTOM`)
CookieRememberName = sec.Key("COOKIE_REMEMBER_NAME").MustString("gitea_incredible")
ReverseProxyAuthUser = sec.Key("REVERSE_PROXY_AUTHENTICATION_USER").MustString("X-WEBAUTH-USER")
MinPasswordLength = sec.Key("MIN_PASSWORD_LENGTH").MustInt(6)
+ ImportLocalPaths = sec.Key("IMPORT_LOCAL_PATHS").MustBool(false)
sec = Cfg.Section("attachment")
AttachmentPath = sec.Key("PATH").MustString(path.Join(AppDataPath, "attachments"))
@@ -897,11 +899,11 @@ func newLogService() {
useConsole := false
for _, mode := range LogModes {
- if mode == "console" {
+ if mode == "console" {
useConsole = true
}
}
- if (!useConsole) {
+ if !useConsole {
log.DelLogger("console")
}