summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-08-28 16:44:04 +0800
committerUnknwon <u@gogs.io>2015-08-28 16:44:04 +0800
commit46bee50e45ef8f3e9f3727649fa24d50bb2fc782 (patch)
tree3b55f109f957c54890972d533af435d3a3ed8e96 /models
parent4cfa2ca40d4f211a124ab9973dfc814190b758b9 (diff)
downloadgitea-46bee50e45ef8f3e9f3727649fa24d50bb2fc782.tar.gz
gitea-46bee50e45ef8f3e9f3727649fa24d50bb2fc782.zip
complate list of gitignores and licenses
Diffstat (limited to 'models')
-rw-r--r--models/repo.go10
-rw-r--r--models/user.go3
2 files changed, 9 insertions, 4 deletions
diff --git a/models/repo.go b/models/repo.go
index 61105d84ac..31f013f02f 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -44,7 +44,7 @@ var (
)
var (
- Gitignores, Licenses []string
+ Gitignores, Licenses, Readmes []string
)
var (
@@ -52,9 +52,9 @@ var (
)
func LoadRepoConfig() {
- // Load .gitignore and license files.
- types := []string{"gitignore", "license"}
- typeFiles := make([][]string, 2)
+ // Load .gitignore and license files and readme templates.
+ types := []string{"gitignore", "license", "readme"}
+ typeFiles := make([][]string, 3)
for i, t := range types {
files, err := bindata.AssetDir("conf/" + t)
if err != nil {
@@ -78,8 +78,10 @@ func LoadRepoConfig() {
Gitignores = typeFiles[0]
Licenses = typeFiles[1]
+ Readmes = typeFiles[2]
sort.Strings(Gitignores)
sort.Strings(Licenses)
+ sort.Strings(Readmes)
}
func NewRepoContext() {
diff --git a/models/user.go b/models/user.go
index 1935799041..c548d6d2e3 100644
--- a/models/user.go
+++ b/models/user.go
@@ -69,6 +69,9 @@ type User struct {
Created time.Time `xorm:"CREATED"`
Updated time.Time `xorm:"UPDATED"`
+ // Remember visibility choice for convenience.
+ LastRepoVisibility bool
+
// Permissions.
IsActive bool
IsAdmin bool