Explorar el Código

Removed UsercontentURL

Yoginth hace 7 años
padre
commit
58d7cc1887
Se han modificado 5 ficheros con 1 adiciones y 8 borrados
  1. 0 2
      gitote.go
  2. 1 1
      models/user.go
  3. 0 1
      pkg/form/user.go
  4. 0 1
      pkg/setting/setting.go
  5. 0 3
      pkg/template/template.go

+ 0 - 2
gitote.go

@@ -38,8 +38,6 @@ func init() {
 	raven.SetDSN("https://c711d9b100e74dfeb5fdee84a4d6c273:ff5ccef0870a48aea106d89b67a69710@sentry.io/1268720")
 	setting.AppVer = AppVer
 	setting.APIVer = APIVer
-	setting.AppURL = "https://gitote.in"
-	setting.UsercontentURL = "https://gitoteusercontent.gitote.in"
 }
 
 func main() {

+ 1 - 1
models/user.go

@@ -329,7 +329,7 @@ func (u *User) RelAvatarLink() string {
 func (u *User) AvatarLink() string {
 	link := u.RelAvatarLink()
 	if link[0] == '/' && link[1] != '/' {
-		return setting.UsercontentURL + strings.TrimPrefix(link, setting.AppSubURL)[1:]
+		return setting.AppURL + strings.TrimPrefix(link, setting.AppSubURL)[1:]
 	}
 	return link
 }

+ 0 - 1
pkg/form/user.go

@@ -29,7 +29,6 @@ type Install struct {
 	UseBuiltinSSHServer bool
 	HTTPPort            string `binding:"Required"`
 	AppUrl              string `binding:"Required"`
-	UsercontentURL      string `binding:"Required"`
 	LogRootPath         string `binding:"Required"`
 	EnableConsoleMode   bool
 

+ 0 - 1
pkg/setting/setting.go

@@ -58,7 +58,6 @@ var (
 	AppVer         string
 	APIVer         string
 	AppURL         string
-	UsercontentURL string
 	AppSubURL      string
 	AppSubURLDepth int // Number of slashes
 	AppPath        string

+ 0 - 3
pkg/template/template.go

@@ -44,9 +44,6 @@ func NewFuncMap() []template.FuncMap {
 		"AppURL": func() string {
 			return setting.AppURL
 		},
-		"UsercontentURL": func() string {
-			return setting.UsercontentURL
-		},
 		"AppVer": func() string {
 			return setting.AppVer
 		},