diff options
author | Unknown <joe2010xtmf@163.com> | 2014-06-03 12:16:44 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-06-03 12:16:44 -0400 |
commit | 9c3aa6936acc16a4b127874dea5a5519d20e44e1 (patch) | |
tree | 77fffea1a922a9b93221616dc10d8207348ccb71 | |
parent | 32c5fa514c92f9b29e41f86e765d25890e6d9bb8 (diff) | |
download | gitea-9c3aa6936acc16a4b127874dea5a5519d20e44e1.tar.gz gitea-9c3aa6936acc16a4b127874dea5a5519d20e44e1.zip |
Fix #223
-rw-r--r-- | routers/repo/setting.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/routers/repo/setting.go b/routers/repo/setting.go index fe2489923e..0232dbcfe3 100644 --- a/routers/repo/setting.go +++ b/routers/repo/setting.go @@ -7,6 +7,7 @@ package repo import ( "fmt" "strings" + "time" "github.com/go-martini/martini" @@ -72,6 +73,7 @@ func SettingPost(ctx *middleware.Context, form auth.RepoSettingForm) { if ctx.Repo.Repository.IsMirror { if form.Interval > 0 { ctx.Repo.Mirror.Interval = form.Interval + ctx.Repo.Mirror.NextUpdate = time.Now().Add(time.Duration(form.Interval) * time.Hour) if err := models.UpdateMirror(ctx.Repo.Mirror); err != nil { log.Error("setting.SettingPost(UpdateMirror): %v", err) } |