diff options
author | Unknwon <u@gogs.io> | 2015-10-25 04:26:26 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-10-25 04:26:26 -0400 |
commit | 022820103d622dda74aa1c619ca46838a14b762a (patch) | |
tree | 2de093f709bb04c366cee4ebb73dcc3230f7019a /modules/base | |
parent | d5fab7f1b993ac389d751bfb87774549c4f3f4c2 (diff) | |
download | gitea-022820103d622dda74aa1c619ca46838a14b762a.tar.gz gitea-022820103d622dda74aa1c619ca46838a14b762a.zip |
#1657 allow forcing all private repos
Diffstat (limited to 'modules/base')
-rw-r--r-- | modules/base/template.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/base/template.go b/modules/base/template.go index f5f567aded..0fd1af755c 100644 --- a/modules/base/template.go +++ b/modules/base/template.go @@ -59,8 +59,8 @@ func ShortSha(sha1 string) string { func DetectEncoding(content []byte) (string, error) { detector := chardet.NewTextDetector() result, err := detector.DetectBest(content) - if result.Charset != "UTF-8" && len(setting.AnsiCharset) > 0 { - return setting.AnsiCharset, err + if result.Charset != "UTF-8" && len(setting.Repository.AnsiCharset) > 0 { + return setting.Repository.AnsiCharset, err } return result.Charset, err } |