1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-10-29 08:17:31 -04:00
This commit is contained in:
Unknown 2014-06-03 12:16:44 -04:00
parent 32c5fa514c
commit 9c3aa6936a

View File

@ -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)
}