admin: sync wiki's hook files as well

This commit is contained in:
Unknwon 2017-02-15 05:15:39 -05:00
parent 32a868d431
commit 6132a82287
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3

View File

@ -1663,7 +1663,15 @@ func ReinitMissingRepositories() error {
func SyncRepositoryHooks() error {
return x.Where("id > 0").Iterate(new(Repository),
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
})
}