From 648d9e253c1924b832248f26fee42b2fb64dc3bc Mon Sep 17 00:00:00 2001 From: ᴜɴᴋɴᴡᴏɴ Date: Sat, 22 Feb 2020 09:05:26 +0800 Subject: conf: overhaul server settings (#5928) * conf: rename package * Requires Go 1.12 * Fix lint * Fix lint * Overhaul * db: fix tests * Save my work * Fix tests * Server.UnixSocketPermission * Server.LocalRootURL * SSH settings * Server.OfflineMode * Save my work * App.Version * Remove [server] STATIC_ROOT_PATH * Server.LandingURL --- internal/route/admin/notice.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'internal/route/admin/notice.go') diff --git a/internal/route/admin/notice.go b/internal/route/admin/notice.go index 6c591fb0..20ce1356 100644 --- a/internal/route/admin/notice.go +++ b/internal/route/admin/notice.go @@ -9,9 +9,9 @@ import ( "github.com/unknwon/paginater" log "unknwon.dev/clog/v2" + "gogs.io/gogs/internal/conf" "gogs.io/gogs/internal/context" "gogs.io/gogs/internal/db" - "gogs.io/gogs/internal/setting" ) const ( @@ -28,9 +28,9 @@ func Notices(c *context.Context) { if page <= 1 { page = 1 } - c.Data["Page"] = paginater.New(int(total), setting.UI.Admin.NoticePagingNum, page, 5) + c.Data["Page"] = paginater.New(int(total), conf.UI.Admin.NoticePagingNum, page, 5) - notices, err := db.Notices(page, setting.UI.Admin.NoticePagingNum) + notices, err := db.Notices(page, conf.UI.Admin.NoticePagingNum) if err != nil { c.Handle(500, "Notices", err) return @@ -68,5 +68,5 @@ func EmptyNotices(c *context.Context) { log.Trace("System notices deleted by admin (%s): [start: %d]", c.User.Name, 0) c.Flash.Success(c.Tr("admin.notices.delete_success")) - c.Redirect(setting.AppSubURL + "/admin/notices") + c.Redirect(conf.Server.Subpath + "/admin/notices") } -- cgit v1.2.3