"github.com/gogits/gogs/modules/setting"
)
-const APP_VER = "0.5.0.0907 Beta"
+const APP_VER = "0.5.0.0909 Beta"
func init() {
runtime.GOMAXPROCS(runtime.NumCPU())
// GetActiveWebhooksByRepoId returns all active webhooks of repository.
func GetActiveWebhooksByRepoId(repoId int64) (ws []*Webhook, err error) {
- err = x.Find(&ws, &Webhook{RepoId: repoId, IsActive: true})
+ err = x.Where("repo_id=?", repoId).And("is_active=?", true).Find(&ws)
return ws, err
}
// GetActiveWebhooksByOrgId returns all active webhooks for an organization.
func GetActiveWebhooksByOrgId(orgId int64) (ws []*Webhook, err error) {
- err = x.Find(&ws, &Webhook{OrgId: orgId, IsActive: true})
+ err = x.Where("org_id=?", orgId).And("is_active=?", true).Find(&ws)
return ws, err
}