Browse Source

admin: sync wiki's hook files as well

pull/4129/head
Unknwon 8 years ago
parent
commit
6132a82287
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
  1. 10
      models/repo.go

10
models/repo.go

@ -1663,7 +1663,15 @@ func ReinitMissingRepositories() error {
func SyncRepositoryHooks() error { func SyncRepositoryHooks() error {
return x.Where("id > 0").Iterate(new(Repository), return x.Where("id > 0").Iterate(new(Repository),
func(idx int, bean interface{}) error { func(idx int, bean interface{}) error {
return createDelegateHooks(bean.(*Repository).RepoPath()) repo := bean.(*Repository)
if err := createDelegateHooks(repo.RepoPath()); err != nil {
return err
}
if repo.HasWiki() {
return createDelegateHooks(repo.WikiPath())
}
return nil
}) })
} }

Loading…
Cancel
Save