mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-04 02:12:30 +02:00
Add suburl support
This commit is contained in:
parent
6a7bd097fe
commit
7ba9257a7f
90 changed files with 287 additions and 283 deletions
|
@ -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 {
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue