Browse Source

Refresh repository mirror from database when the repository's name has changed. (#3276)

pull/3151/merge
lstahlman 9 years ago committed by 无闻
parent
commit
25b3836418
  1. 9
      routers/repo/setting.go

9
routers/repo/setting.go

@ -105,6 +105,15 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) {
} }
if repo.IsMirror { if repo.IsMirror {
if isNameChanged {
var err error
ctx.Repo.Mirror, err = models.GetMirror(repo.ID)
if err != nil {
ctx.Handle(500, "RefreshRepositoryMirror", err)
return
}
}
if form.Interval > 0 { if form.Interval > 0 {
ctx.Repo.Mirror.EnablePrune = form.EnablePrune ctx.Repo.Mirror.EnablePrune = form.EnablePrune
ctx.Repo.Mirror.Interval = form.Interval ctx.Repo.Mirror.Interval = form.Interval

Loading…
Cancel
Save