Browse Source

Add build tag enable prompt

tags/v1.2.0-rc1
Unknown 11 years ago
parent
commit
8bed017557
5 changed files with 13 additions and 3 deletions
  1. +1
    -1
      conf/app.ini
  2. +6
    -0
      modules/base/conf.go
  3. +1
    -0
      modules/middleware/repo.go
  4. +4
    -1
      routers/install.go
  5. +1
    -1
      templates/repo/single_list.tmpl

+ 1
- 1
conf/app.ini View File

@@ -22,7 +22,7 @@ CERT_FILE = cert.pem
KEY_FILE = key.pem

[database]
; Either "mysql", "postgres" or "sqlite3"(binary release only), it's your choice
; Either "mysql", "postgres" or "sqlite3", it's your choice
DB_TYPE = mysql
HOST = 127.0.0.1:3306
NAME = gogs


+ 6
- 0
modules/base/conf.go View File

@@ -174,6 +174,12 @@ func newLogService() {

func newCacheService() {
CacheAdapter = Cfg.MustValue("cache", "ADAPTER", "memory")
if cache.EnableRedis {
log.Info("Redis Enabled")
}
if cache.EnableMemcache {
log.Info("Memcache Enabled")
}

switch CacheAdapter {
case "memory":


+ 1
- 0
modules/middleware/repo.go View File

@@ -201,6 +201,7 @@ func RepoAssignment(redirect bool, args ...bool) martini.Handler {

// repo is bare and display enable
if displayBare && ctx.Repo.Repository.IsBare {
log.Debug("Bare repository: %s", ctx.Repo.RepoLink)
ctx.HTML(200, "repo/single_bare")
return
}


+ 4
- 1
routers/install.go View File

@@ -49,6 +49,7 @@ func GlobalInit() {
models.LoadModelsConfig()
models.LoadRepoConfig()
models.NewRepoContext()
NewServices()

if base.InstallLock {
if err := models.NewEngine(); err != nil {
@@ -56,9 +57,11 @@ func GlobalInit() {
}

models.HasEngine = true
if models.EnableSQLite3 {
log.Info("SQLite3 Enabled")
}
cron.NewCronContext()
}
NewServices()
checkRunMode()
}



+ 1
- 1
templates/repo/single_list.tmpl View File

@@ -36,7 +36,7 @@
</span>
</td>
<td class="text">
<span class="wrap"><a href="/{{$.Username}}/{{$.Reponame}}/commit/{{$commit.Id}}">{{$commit.Message}}</a></span>
<span class="wrap"><a rel="nofollow" href="/{{$.Username}}/{{$.Reponame}}/commit/{{$commit.Id}}">{{$commit.Message}}</a></span>
</td>
<td class="date">
<span class="wrap">{{TimeSince $commit.Committer.When}}</span>


Loading…
Cancel
Save