mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-21 08:30:50 +00:00
Backport #27103 by @JakobDev Part of #27065 Co-authored-by: JakobDev <jakobdev@gmx.de> Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
This commit is contained in:
parent
597b04fe2f
commit
fc7d3f7315
109 changed files with 353 additions and 306 deletions
|
@ -30,7 +30,7 @@ func Notices(ctx *context.Context) {
|
|||
page = 1
|
||||
}
|
||||
|
||||
notices, err := system_model.Notices(page, setting.UI.Admin.NoticePagingNum)
|
||||
notices, err := system_model.Notices(ctx, page, setting.UI.Admin.NoticePagingNum)
|
||||
if err != nil {
|
||||
ctx.ServerError("Notices", err)
|
||||
return
|
||||
|
@ -55,7 +55,7 @@ func DeleteNotices(ctx *context.Context) {
|
|||
}
|
||||
}
|
||||
|
||||
if err := system_model.DeleteNoticesByIDs(ids); err != nil {
|
||||
if err := system_model.DeleteNoticesByIDs(ctx, ids); err != nil {
|
||||
ctx.Flash.Error("DeleteNoticesByIDs: " + err.Error())
|
||||
ctx.Status(http.StatusInternalServerError)
|
||||
} else {
|
||||
|
@ -66,7 +66,7 @@ func DeleteNotices(ctx *context.Context) {
|
|||
|
||||
// EmptyNotices delete all the notices
|
||||
func EmptyNotices(ctx *context.Context) {
|
||||
if err := system_model.DeleteNotices(0, 0); err != nil {
|
||||
if err := system_model.DeleteNotices(ctx, 0, 0); err != nil {
|
||||
ctx.ServerError("DeleteNotices", err)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue