diff options
author | ᴜɴᴋɴᴡᴏɴ <u@gogs.io> | 2020-02-22 09:05:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-22 09:05:26 +0800 |
commit | 648d9e253c1924b832248f26fee42b2fb64dc3bc (patch) | |
tree | 51649fad974cd7284a47d30e412c90e7ab72cd2c /internal/route/org/setting.go | |
parent | 5b14cc6f0b7b661beb2640a94bd15660cdb48587 (diff) |
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
Diffstat (limited to 'internal/route/org/setting.go')
-rw-r--r-- | internal/route/org/setting.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/route/org/setting.go b/internal/route/org/setting.go index 366a0f6b..aecd8643 100644 --- a/internal/route/org/setting.go +++ b/internal/route/org/setting.go @@ -9,12 +9,12 @@ import ( log "unknwon.dev/clog/v2" + "gogs.io/gogs/internal/conf" "gogs.io/gogs/internal/context" "gogs.io/gogs/internal/db" "gogs.io/gogs/internal/db/errors" "gogs.io/gogs/internal/form" "gogs.io/gogs/internal/route/user" - "gogs.io/gogs/internal/setting" ) const ( @@ -63,7 +63,7 @@ func SettingsPost(c *context.Context, f form.UpdateOrgSetting) { return } // reset c.org.OrgLink with new name - c.Org.OrgLink = setting.AppSubURL + "/org/" + f.Name + c.Org.OrgLink = conf.Server.Subpath + "/org/" + f.Name log.Trace("Organization name changed: %s -> %s", org.Name, f.Name) } // In case it's just a case change. @@ -130,7 +130,7 @@ func SettingsDelete(c *context.Context) { } } else { log.Trace("Organization deleted: %s", org.Name) - c.Redirect(setting.AppSubURL + "/") + c.Redirect(conf.Server.Subpath + "/") } return } @@ -143,7 +143,7 @@ func Webhooks(c *context.Context) { c.Data["PageIsSettingsHooks"] = true c.Data["BaseLink"] = c.Org.OrgLink c.Data["Description"] = c.Tr("org.settings.hooks_desc") - c.Data["Types"] = setting.Webhook.Types + c.Data["Types"] = conf.Webhook.Types ws, err := db.GetWebhooksByOrgID(c.Org.Organization.ID) if err != nil { |