mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-01 17:38:33 +00:00
Clarify the suffices and prefixes of setting.AppSubURL and setting.AppURL (#12999)
Also removes some unnecessary uses of fmt.Sprintf and adds documentation strings Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
parent
39aa11f9c0
commit
aa4f9180e4
11 changed files with 53 additions and 42 deletions
|
@ -63,7 +63,7 @@ func (u *User) generateRandomAvatar(e Engine) error {
|
|||
// the local explore page. Function returns immediately.
|
||||
// When applicable, the link is for an avatar of the indicated size (in pixels).
|
||||
func (u *User) SizedRelAvatarLink(size int) string {
|
||||
return strings.TrimSuffix(setting.AppSubURL, "/") + "/user/avatar/" + u.Name + "/" + strconv.Itoa(size)
|
||||
return setting.AppSubURL + "/user/avatar/" + u.Name + "/" + strconv.Itoa(size)
|
||||
}
|
||||
|
||||
// RealSizedAvatarLink returns a link to the user's avatar. When
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue