mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-20 07:38:28 +00:00
#1474 minor fix
This commit is contained in:
parent
65843b803b
commit
5ddcd8420b
|
@ -43,12 +43,13 @@ var gravatarSource string
|
|||
|
||||
func UpdateGravatarSource() {
|
||||
gravatarSource = setting.GravatarSource
|
||||
log.Debug("avatar.UpdateGravatarSource(gavatar source): %s", gravatarSource)
|
||||
if !strings.HasPrefix(gravatarSource, "http://") ||
|
||||
if strings.HasPrefix(gravatarSource, "//") {
|
||||
gravatarSource = "http:" + gravatarSource
|
||||
} else if !strings.HasPrefix(gravatarSource, "http://") ||
|
||||
!strings.HasPrefix(gravatarSource, "https://") {
|
||||
gravatarSource = "http://" + gravatarSource
|
||||
log.Debug("avatar.UpdateGravatarSource(update gavatar source): %s", gravatarSource)
|
||||
}
|
||||
log.Debug("avatar.UpdateGravatarSource(update gavatar source): %s", gravatarSource)
|
||||
}
|
||||
|
||||
// hash email to md5 string
|
||||
|
|
Loading…
Reference in a new issue