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

Rename module: middleware -> context

This commit is contained in:
Unknwon
2016-03-11 11:56:52 -05:00
parent cb1eadc276
commit 514382e2eb
54 changed files with 666 additions and 669 deletions

View File

@@ -10,8 +10,8 @@ import (
"github.com/gogits/gogs/models"
"github.com/gogits/gogs/modules/base"
"github.com/gogits/gogs/modules/context"
"github.com/gogits/gogs/modules/log"
"github.com/gogits/gogs/modules/middleware"
"github.com/gogits/gogs/modules/setting"
)
@@ -19,7 +19,7 @@ const (
NOTICES base.TplName = "admin/notice"
)
func Notices(ctx *middleware.Context) {
func Notices(ctx *context.Context) {
ctx.Data["Title"] = ctx.Tr("admin.notices")
ctx.Data["PageIsAdmin"] = true
ctx.Data["PageIsAdminNotices"] = true
@@ -42,7 +42,7 @@ func Notices(ctx *middleware.Context) {
ctx.HTML(200, NOTICES)
}
func DeleteNotices(ctx *middleware.Context) {
func DeleteNotices(ctx *context.Context) {
strs := ctx.QueryStrings("ids[]")
ids := make([]int64, 0, len(strs))
for i := range strs {
@@ -61,7 +61,7 @@ func DeleteNotices(ctx *middleware.Context) {
}
}
func EmptyNotices(ctx *middleware.Context) {
func EmptyNotices(ctx *context.Context) {
if err := models.DeleteNotices(0, 0); err != nil {
ctx.Handle(500, "DeleteNotices", err)
return