From a5c0f109a92a61ba0b8c05874c6d0afc0501a1e5 Mon Sep 17 00:00:00 2001 From: MuZhou233 Date: Thu, 14 May 2020 15:28:29 +0800 Subject: [PATCH] fix --- link.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/link.php b/link.php index 30c9d90..fedc567 100644 --- a/link.php +++ b/link.php @@ -8,11 +8,11 @@ $db = Typecho_Db::get(); $users = $db->fetchALL($db->select('name','screenName','url','mail','group','introduction')->from('table.users')->where('url <> ?', '')); -function linkCard($user, $avatarRating){ +function linkCard($user){ $url = $user['url']; $name = $user['screenName']; $intro = $user['introduction']; - $avatar = Typecho_Common::gravatarUrl($user['mail'], 144, $this->options->commentsAvatarRating, 'mp', $this->request->isSecure());; + $avatar = $user['avatar']; echo '
@@ -43,7 +43,8 @@ function linkCard($user, $avatarRating){ foreach ($users as $user)if ($user['group'] === $group[$i]) { if (empty($user['screenName'])) $user['screenName'] = $user['name']; $user['introduction'] = Typecho_Common::subStr(Typecho_Common::stripTags(Widget_Abstract_Contents::markdown($user['introduction'])), 0, 14, '...'); - linkCard($user, $this->options->commentsAvatarRating); + $user['avatar'] = Typecho_Common::gravatarUrl($user['mail'], 144, $this->options->commentsAvatarRating, 'mp', $this->request->isSecure()); + linkCard($user); } break; }