diff options
Diffstat (limited to 'routers')
-rw-r--r-- | routers/repo/repo.go | 2 | ||||
-rw-r--r-- | routers/repo/setting.go | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go index a70f31e614..8884bea3ab 100644 --- a/routers/repo/repo.go +++ b/routers/repo/repo.go @@ -356,7 +356,7 @@ func Action(ctx *middleware.Context) { ctx.Repo.Repository.Description = ctx.Query("desc") ctx.Repo.Repository.Website = ctx.Query("site") - err = models.UpdateRepository(ctx.Repo.Repository) + err = models.UpdateRepository(ctx.Repo.Repository, false) } if err != nil { diff --git a/routers/repo/setting.go b/routers/repo/setting.go index 5b9b672c04..be21405bf6 100644 --- a/routers/repo/setting.go +++ b/routers/repo/setting.go @@ -78,8 +78,9 @@ func SettingsPost(ctx *middleware.Context, form auth.RepoSettingForm) { } ctx.Repo.Repository.Description = form.Description ctx.Repo.Repository.Website = form.Website + visibilityChanged := ctx.Repo.Repository.IsPrivate != form.Private ctx.Repo.Repository.IsPrivate = form.Private - if err := models.UpdateRepository(ctx.Repo.Repository); err != nil { + if err := models.UpdateRepository(ctx.Repo.Repository, visibilityChanged); err != nil { ctx.Handle(404, "UpdateRepository", err) return } |