mirror of
https://github.com/silverstripe/silverstripe-comments
synced 2024-10-22 11:05:49 +02:00
Merge pull request #249 from Dennisprins93/master
This commit is contained in:
commit
aa46291adf
@ -732,11 +732,15 @@ class Comment extends DataObject
|
||||
$use_gravatar = $this->getOption('use_gravatar');
|
||||
|
||||
if ($use_gravatar) {
|
||||
$gravatar = 'http://www.gravatar.com/avatar/' . md5(strtolower(trim($this->Email)));
|
||||
$gravatar = 'https://www.gravatar.com/avatar/' . md5(strtolower(trim($this->Email)));
|
||||
$gravatarsize = $this->getOption('gravatar_size');
|
||||
$gravatardefault = $this->getOption('gravatar_default');
|
||||
$gravatarrating = $this->getOption('gravatar_rating');
|
||||
$gravatar .= '?s=' . $gravatarsize . '&d=' . $gravatardefault . '&r=' . $gravatarrating;
|
||||
$gravatar .= '?' . http_build_query(array(
|
||||
's' => $gravatarsize,
|
||||
'd' => $gravatardefault,
|
||||
'r' => $gravatarrating,
|
||||
));
|
||||
}
|
||||
|
||||
return $gravatar;
|
||||
|
@ -992,7 +992,7 @@ class CommentsTest extends FunctionalTest
|
||||
$comment = $this->objFromFixture(Comment::class, 'firstComA');
|
||||
|
||||
$this->assertEquals(
|
||||
'http://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?s'
|
||||
'https://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?s'
|
||||
. '=80&d=identicon&r=g',
|
||||
$comment->Gravatar()
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user