1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Add suburl support

This commit is contained in:
Unknwon
2014-09-19 20:11:34 -04:00
parent 6a7bd097fe
commit 7ba9257a7f
90 changed files with 287 additions and 283 deletions

View File

@@ -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 {

View File

@@ -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.