Browse Source

base/tool: reduce unnecessary report

pull/4116/head
Unknwon 8 years ago
parent
commit
ab78d4e2b7
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
  1. 2
      README.md
  2. 2
      README_ZH.md
  3. 5
      modules/base/tool.go

2
README.md

@ -46,6 +46,7 @@ The goal of this project is to make the easiest, fastest, and most painless way
- Repository issues, pull requests and wiki
- Migrate and mirror repository and its wiki
- Web editor for repository files and wiki
- Jupyter Notebook
- Gravatar and Federated avatar with custom source
- Mail service
- Administration panel
@ -105,6 +106,7 @@ There are 5 ways to install Gogs:
## Software and Service Support
- [Drone](https://github.com/drone/drone) (CI)
- [Jenkins](https://wiki.jenkins-ci.org/display/JENKINS/Gogs+Webhook+Plugin) (CI)
- [Fabric8](http://fabric8.io/) (DevOps)
- [Taiga](https://taiga.io/) (Project Management)
- [Puppet](https://forge.puppetlabs.com/Siteminds/gogs) (IT)

2
README_ZH.md

@ -28,6 +28,7 @@ Gogs 的目标是打造一个最简单、最快速和最轻松的方式搭建自
- 支持迁移和镜像仓库以及它的 Wiki
- 支持在线编辑仓库文件和 Wiki
- 支持自定义源的 Gravatar 和 Federated Avatar
- 支持 Jupyter Notebook
- 支持邮件服务
- 支持后台管理面板
- 支持 MySQL、PostgreSQL、SQLite3 和 [TiDB](https://github.com/pingcap/tidb)(实验性支持) 数据库
@ -74,6 +75,7 @@ Gogs 的目标是打造一个最简单、最快速和最轻松的方式搭建自
## 软件及服务支持
- [Drone](https://github.com/drone/drone)(CI)
- [Jenkins](https://wiki.jenkins-ci.org/display/JENKINS/Gogs+Webhook+Plugin)(CI)
- [Fabric8](http://fabric8.io/)(DevOps)
- [Taiga](https://taiga.io/)(项目管理)
- [Puppet](https://forge.puppetlabs.com/Siteminds/gogs)(IT)

5
modules/base/tool.go

@ -181,11 +181,12 @@ func HashEmail(email string) string {
// which includes app sub-url as prefix. However, it is possible
// to return full URL if user enables Gravatar-like service.
func AvatarLink(email string) (url string) {
if setting.EnableFederatedAvatar && setting.LibravatarService != nil {
if setting.EnableFederatedAvatar && setting.LibravatarService != nil &&
len(email) > 0 {
var err error
url, err = setting.LibravatarService.FromEmail(email)
if err != nil {
log.Error(4, "LibravatarService.FromEmail [%s]: %v", email, err)
log.Error(3, "LibravatarService.FromEmail [%s]: %v", email, err)
}
}
if len(url) == 0 && !setting.DisableGravatar {

Loading…
Cancel
Save