mirror of
https://github.com/go-gitea/gitea
synced 2024-12-22 13:04:07 +01:00
#1474 minor fix
This commit is contained in:
parent
65843b803b
commit
5ddcd8420b
1 changed files with 4 additions and 3 deletions
|
@ -43,12 +43,13 @@ var gravatarSource string
|
||||||
|
|
||||||
func UpdateGravatarSource() {
|
func UpdateGravatarSource() {
|
||||||
gravatarSource = setting.GravatarSource
|
gravatarSource = setting.GravatarSource
|
||||||
log.Debug("avatar.UpdateGravatarSource(gavatar source): %s", gravatarSource)
|
if strings.HasPrefix(gravatarSource, "//") {
|
||||||
if !strings.HasPrefix(gravatarSource, "http://") ||
|
gravatarSource = "http:" + gravatarSource
|
||||||
|
} else if !strings.HasPrefix(gravatarSource, "http://") ||
|
||||||
!strings.HasPrefix(gravatarSource, "https://") {
|
!strings.HasPrefix(gravatarSource, "https://") {
|
||||||
gravatarSource = "http://" + gravatarSource
|
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
|
// hash email to md5 string
|
||||||
|
|
Loading…
Reference in a new issue