diff options
author | Unknwon <joe2010xtmf@163.com> | 2014-09-19 20:11:34 -0400 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2014-09-19 20:11:34 -0400 |
commit | 7ba9257a7ff659417501baf7358216555cebcd86 (patch) | |
tree | ffc842cec4165d1069220ae16e08a0b824952f4b /models | |
parent | 6a7bd097fe2b3e894830fc3fdb60dde5594b61d6 (diff) | |
download | gitea-7ba9257a7ff659417501baf7358216555cebcd86.tar.gz gitea-7ba9257a7ff659417501baf7358216555cebcd86.zip |
Add suburl support
Diffstat (limited to 'models')
-rw-r--r-- | models/action.go | 2 | ||||
-rw-r--r-- | models/user.go | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/models/action.go b/models/action.go index 596f51aff2..b4457656ba 100644 --- a/models/action.go +++ b/models/action.go @@ -137,7 +137,7 @@ func updateIssuesCommit(userId, repoId int64, repoUserName, repoName string, com return err } - url := fmt.Sprintf("%s/%s/%s/commit/%s", setting.AppRootSubUrl, repoUserName, repoName, c.Sha1) + url := fmt.Sprintf("%s/%s/%s/commit/%s", setting.AppSubUrl, repoUserName, repoName, c.Sha1) message := fmt.Sprintf(`<a href="%s">%s</a>`, url, c.Message) if _, err = CreateComment(userId, issue.RepoId, issue.Id, 0, 0, COMMIT, message, nil); err != nil { diff --git a/models/user.go b/models/user.go index 1bed8109a2..46e1b1554b 100644 --- a/models/user.go +++ b/models/user.go @@ -82,14 +82,14 @@ type User struct { // DashboardLink returns the user dashboard page link. func (u *User) DashboardLink() string { if u.IsOrganization() { - return setting.AppRootSubUrl + "/org/" + u.Name + "/dashboard/" + return setting.AppSubUrl + "/org/" + u.Name + "/dashboard/" } - return setting.AppRootSubUrl + "/" + return setting.AppSubUrl + "/" } // HomeLink returns the user home page link. func (u *User) HomeLink() string { - return setting.AppRootSubUrl + "/user/" + u.Name + return setting.AppSubUrl + "/user/" + u.Name } // AvatarLink returns user gravatar link. |