1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-30 22:28:37 +00:00

And others

This commit is contained in:
Sandro Santilli
2016-11-07 17:53:22 +01:00
parent b3828e38a5
commit aadd7dcdc3
12 changed files with 34 additions and 34 deletions

View File

@@ -22,7 +22,7 @@ func Organizations(ctx *context.Context) {
ctx.Data["PageIsAdminOrganizations"] = true
routers.RenderUserSearch(ctx, &routers.UserSearchOptions{
Type: models.USER_TYPE_ORGANIZATION,
Type: models.UserTypeOrganization,
Counter: models.CountOrganizations,
Ranger: models.Organizations,
PageSize: setting.UI.Admin.OrgPagingNum,

View File

@@ -30,7 +30,7 @@ func Users(ctx *context.Context) {
ctx.Data["PageIsAdminUsers"] = true
routers.RenderUserSearch(ctx, &routers.UserSearchOptions{
Type: models.USER_TYPE_INDIVIDUAL,
Type: models.UserTypeIndividual,
Counter: models.CountUsers,
Ranger: models.Users,
PageSize: setting.UI.Admin.UserPagingNum,

View File

@@ -27,7 +27,7 @@ func CreateOrg(ctx *context.APIContext, form api.CreateOrgOption) {
Website: form.Website,
Location: form.Location,
IsActive: true,
Type: models.USER_TYPE_ORGANIZATION,
Type: models.UserTypeOrganization,
}
if err := models.CreateOrganization(org, u); err != nil {
if models.IsErrUserAlreadyExist(err) ||

View File

@@ -16,7 +16,7 @@ import (
func Search(ctx *context.APIContext) {
opts := &models.SearchUserOptions{
Keyword: ctx.Query("q"),
Type: models.USER_TYPE_INDIVIDUAL,
Type: models.UserTypeIndividual,
PageSize: com.StrTo(ctx.Query("limit")).MustInt(),
}
if opts.PageSize == 0 {

View File

@@ -172,7 +172,7 @@ func ExploreUsers(ctx *context.Context) {
ctx.Data["PageIsExploreUsers"] = true
RenderUserSearch(ctx, &UserSearchOptions{
Type: models.USER_TYPE_INDIVIDUAL,
Type: models.UserTypeIndividual,
Counter: models.CountUsers,
Ranger: models.Users,
PageSize: setting.UI.ExplorePagingNum,
@@ -187,7 +187,7 @@ func ExploreOrganizations(ctx *context.Context) {
ctx.Data["PageIsExploreOrganizations"] = true
RenderUserSearch(ctx, &UserSearchOptions{
Type: models.USER_TYPE_ORGANIZATION,
Type: models.UserTypeOrganization,
Counter: models.CountOrganizations,
Ranger: models.Organizations,
PageSize: setting.UI.ExplorePagingNum,

View File

@@ -33,7 +33,7 @@ func CreatePost(ctx *context.Context, form auth.CreateOrgForm) {
org := &models.User{
Name: form.OrgName,
IsActive: true,
Type: models.USER_TYPE_ORGANIZATION,
Type: models.UserTypeOrganization,
}
if err := models.CreateOrganization(org, ctx.User); err != nil {

View File

@@ -134,9 +134,9 @@ func WebHooksNewPost(ctx *context.Context, form auth.NewWebhookForm) {
return
}
contentType := models.JSON
if models.HookContentType(form.ContentType) == models.FORM {
contentType = models.FORM
contentType := models.ContentTypeJson
if models.HookContentType(form.ContentType) == models.ContentTypeForm {
contentType = models.ContentTypeForm
}
w := &models.Webhook{
@@ -192,7 +192,7 @@ func SlackHooksNewPost(ctx *context.Context, form auth.NewSlackHookForm) {
w := &models.Webhook{
RepoID: orCtx.RepoID,
URL: form.PayloadURL,
ContentType: models.JSON,
ContentType: models.ContentTypeJson,
HookEvent: ParseHookEvent(form.WebhookForm),
IsActive: form.Active,
HookTaskType: models.SLACK,
@@ -281,9 +281,9 @@ func WebHooksEditPost(ctx *context.Context, form auth.NewWebhookForm) {
return
}
contentType := models.JSON
if models.HookContentType(form.ContentType) == models.FORM {
contentType = models.FORM
contentType := models.ContentTypeJson
if models.HookContentType(form.ContentType) == models.ContentTypeForm {
contentType = models.ContentTypeForm
}
w.URL = form.PayloadURL