aboutsummaryrefslogtreecommitdiffstats
path: root/models/user.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2016-11-27 18:14:25 +0800
committerGitHub <noreply@github.com>2016-11-27 18:14:25 +0800
commit94da47271701401b6959bfd308d6c74fd30b22e2 (patch)
tree92a6c3298ab198efa04fbe4409d282da44736640 /models/user.go
parent0a76d260fa16764ab66bf1623b4cd9e9adfdac27 (diff)
downloadgitea-94da47271701401b6959bfd308d6c74fd30b22e2.tar.gz
gitea-94da47271701401b6959bfd308d6c74fd30b22e2.zip
Golint fixed for modules/setting (#262)
* golint fixed for modules/setting * typo fixed and renamed UNIXSOCKET to UnixSocket
Diffstat (limited to 'models/user.go')
-rw-r--r--models/user.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/models/user.go b/models/user.go
index 6c0223e6ee..1e15b2a965 100644
--- a/models/user.go
+++ b/models/user.go
@@ -198,14 +198,14 @@ func (u *User) CanImportLocal() bool {
// DashboardLink returns the user dashboard page link.
func (u *User) DashboardLink() string {
if u.IsOrganization() {
- return setting.AppSubUrl + "/org/" + u.Name + "/dashboard/"
+ return setting.AppSubURL + "/org/" + u.Name + "/dashboard/"
}
- return setting.AppSubUrl + "/"
+ return setting.AppSubURL + "/"
}
// HomeLink returns the user or organization home page link.
func (u *User) HomeLink() string {
- return setting.AppSubUrl + "/" + u.Name
+ return setting.AppSubURL + "/" + u.Name
}
// GenerateEmailActivateCode generates an activate code based on user information and given e-mail.
@@ -261,7 +261,7 @@ func (u *User) GenerateRandomAvatar() error {
// which includes app sub-url as prefix. However, it is possible
// to return full URL if user enables Gravatar-like service.
func (u *User) RelAvatarLink() string {
- defaultImgUrl := setting.AppSubUrl + "/img/avatar_default.png"
+ defaultImgUrl := setting.AppSubURL + "/img/avatar_default.png"
if u.ID == -1 {
return defaultImgUrl
}
@@ -271,7 +271,7 @@ func (u *User) RelAvatarLink() string {
if !com.IsExist(u.CustomAvatarPath()) {
return defaultImgUrl
}
- return setting.AppSubUrl + "/avatars/" + com.ToStr(u.ID)
+ return setting.AppSubURL + "/avatars/" + com.ToStr(u.ID)
case setting.DisableGravatar, setting.OfflineMode:
if !com.IsExist(u.CustomAvatarPath()) {
if err := u.GenerateRandomAvatar(); err != nil {
@@ -279,7 +279,7 @@ func (u *User) RelAvatarLink() string {
}
}
- return setting.AppSubUrl + "/avatars/" + com.ToStr(u.ID)
+ return setting.AppSubURL + "/avatars/" + com.ToStr(u.ID)
}
return base.AvatarLink(u.AvatarEmail)
}
@@ -288,7 +288,7 @@ func (u *User) RelAvatarLink() string {
func (u *User) AvatarLink() string {
link := u.RelAvatarLink()
if link[0] == '/' && link[1] != '/' {
- return setting.AppUrl + strings.TrimPrefix(link, setting.AppSubUrl)[1:]
+ return setting.AppURL + strings.TrimPrefix(link, setting.AppSubURL)[1:]
}
return link
}