summaryrefslogtreecommitdiff
path: root/libs/Comments.php
diff options
context:
space:
mode:
Diffstat (limited to 'libs/Comments.php')
-rw-r--r--libs/Comments.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/libs/Comments.php b/libs/Comments.php
index 52a7c6a..96c03f3 100644
--- a/libs/Comments.php
+++ b/libs/Comments.php
@@ -42,7 +42,14 @@ Class Comments {
{
//MD5 EMail
$email = md5($email);
- $avatar = 'https://cravatar.cn/avatar/' . $email . '?s=' . $size;
+
+ // 如果配置了 CustomGravatarCDN,则用 CustomGravatarCDN 拼接
+ if (Helper::options()->CustomGravatarCDN) {
+ $avatar = Helper::options()->CustomGravatarCDN . $email . '?s=' . $size;
+ } // 否则,使用 Cravatar
+ else {
+ $avatar = 'https://cravatar.cn/avatar/' . $email . '?s=' . $size;
+ }
return $avatar;
}