mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-04 02:12:30 +02:00
Add flash
This commit is contained in:
parent
459223cf01
commit
45462662e9
17 changed files with 179 additions and 129 deletions
|
@ -23,10 +23,6 @@ import (
|
|||
"github.com/gogits/gogs/modules/middleware"
|
||||
)
|
||||
|
||||
type installRouter int
|
||||
|
||||
var InstallRouter installRouter = 1
|
||||
|
||||
// Check run mode(Default of martini is Dev).
|
||||
func checkRunMode() {
|
||||
switch base.Cfg.MustValue("", "RUN_MODE") {
|
||||
|
@ -58,7 +54,7 @@ func GlobalInit() {
|
|||
checkRunMode()
|
||||
}
|
||||
|
||||
func (r installRouter) Get(ctx *middleware.Context, form auth.InstallForm) {
|
||||
func Install(ctx *middleware.Context, form auth.InstallForm) {
|
||||
if base.InstallLock {
|
||||
ctx.Handle(404, "install.Install", errors.New("Installation is prohibited"))
|
||||
return
|
||||
|
@ -101,7 +97,7 @@ func (r installRouter) Get(ctx *middleware.Context, form auth.InstallForm) {
|
|||
ctx.HTML(200, "install")
|
||||
}
|
||||
|
||||
func (r installRouter) Post(ctx *middleware.Context, form auth.InstallForm) {
|
||||
func InstallPost(ctx *middleware.Context, form auth.InstallForm) {
|
||||
if base.InstallLock {
|
||||
ctx.Handle(404, "install.Install", errors.New("Installation is prohibited"))
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue