diff --git a/backend/init/migration/migrations/init.go b/backend/init/migration/migrations/init.go index e1341278e..206a1b2c4 100644 --- a/backend/init/migration/migrations/init.go +++ b/backend/init/migration/migrations/init.go @@ -243,14 +243,14 @@ var AddDefaultGroup = &gormigrate.Migration{ ID: "2023022-change-default-group", Migrate: func(tx *gorm.DB) error { defaultGroup := &model.Group{ - Name: "默认", + Name: "Default", IsDefault: true, Type: "website", } if err := tx.Create(defaultGroup).Error; err != nil { return err } - if err := tx.Model(&model.Group{}).Where("name = ? AND type = ?", "default", "host").Update("name", "默认").Error; err != nil { + if err := tx.Model(&model.Group{}).Where("name = ? AND type = ?", "default", "host").Update("name", "Default").Error; err != nil { return err } if err := tx.Model(&model.Website{}).Where("1 = 1").Update("website_group_id", defaultGroup.ID).Error; err != nil { diff --git a/backend/init/migration/migrations/v_1_8.go b/backend/init/migration/migrations/v_1_8.go index b47fc91c2..261739ce4 100644 --- a/backend/init/migration/migrations/v_1_8.go +++ b/backend/init/migration/migrations/v_1_8.go @@ -35,7 +35,7 @@ var AddCommandGroup = &gormigrate.Migration{ if err := tx.AutoMigrate(&model.Command{}); err != nil { return err } - defaultCommand := &model.Group{IsDefault: true, Name: "默认", Type: "command"} + defaultCommand := &model.Group{IsDefault: true, Name: "Default", Type: "command"} if err := tx.Create(defaultCommand).Error; err != nil { return err } diff --git a/backend/init/migration/migrations/v_1_9.go b/backend/init/migration/migrations/v_1_9.go index 05c536ec4..ab2f6b0ef 100644 --- a/backend/init/migration/migrations/v_1_9.go +++ b/backend/init/migration/migrations/v_1_9.go @@ -121,7 +121,7 @@ var AddTablePHPExtensions = &gormigrate.Migration{ if err := tx.AutoMigrate(&model.PHPExtensions{}); err != nil { return err } - if err := tx.Create(&model.PHPExtensions{Name: "默认", Extensions: "bcmath,gd,gettext,intl,pcntl,shmop,soap,sockets,sysvsem,xmlrpc,zip"}).Error; err != nil { + if err := tx.Create(&model.PHPExtensions{Name: "Default", Extensions: "bcmath,gd,gettext,intl,pcntl,shmop,soap,sockets,sysvsem,xmlrpc,zip"}).Error; err != nil { return err } if err := tx.Create(&model.PHPExtensions{Name: "WordPress", Extensions: "exif,igbinary,imagick,intl,zip,apcu,memcached,opcache,redis,bc,image,shmop,mysqli,pdo_mysql,gd"}).Error; err != nil { @@ -133,9 +133,6 @@ var AddTablePHPExtensions = &gormigrate.Migration{ if err := tx.Create(&model.PHPExtensions{Name: "Flarum", Extensions: "curl,gd,pdo_mysql,mysqli,bz2,exif,yaf,imap"}).Error; err != nil { return err } - if err := tx.Create(&model.PHPExtensions{Name: "苹果CMS-V10", Extensions: "mysqli,pdo_mysql,zip,gd,redis,memcache,memcached"}).Error; err != nil { - return err - } if err := tx.Create(&model.PHPExtensions{Name: "SeaCMS", Extensions: "mysqli,pdo_mysql,gd,curl"}).Error; err != nil { return err } diff --git a/backend/init/router/router.go b/backend/init/router/router.go index a757f16b2..f529bb215 100644 --- a/backend/init/router/router.go +++ b/backend/init/router/router.go @@ -96,10 +96,6 @@ func handleNoRoute(c *gin.Context) { } file := fmt.Sprintf("html/%s.html", resPage) - if resPage == "200" && c.GetHeader("Accept-Language") == "en" { - file = "html/200_en.html" - } - data, err := res.ErrorMsg.ReadFile(file) if err != nil { c.String(http.StatusInternalServerError, "Internal Server Error") diff --git a/cmd/server/res/html/200.html b/cmd/server/res/html/200.html index 7a9ab4c63..c21b7f15a 100644 --- a/cmd/server/res/html/200.html +++ b/cmd/server/res/html/200.html @@ -1,9 +1,9 @@ - +
-The current environment has enabled secure login access.
-Please enter the following command in the SSH terminal to view the panel login URL:
-1pctl user-info
-