MDL-35669 gravatar Fix secure image urls.
Conflicts: lib/outputcomponents.php
This commit is contained in:
@@ -345,6 +345,7 @@ class user_picture implements renderable {
|
||||
// If the currently requested page is https then we'll return an
|
||||
// https gravatar page.
|
||||
if (strpos($CFG->httpswwwroot, 'https:') === 0) {
|
||||
$gravatardefault = str_replace($CFG->wwwroot, $CFG->httpswwwroot, $gravatardefault); // Replace by secure url.
|
||||
$imageurl = new moodle_url("https://secure.gravatar.com/avatar/{$md5}", array('s' => $size, 'd' => $gravatardefault));
|
||||
} else {
|
||||
$imageurl = new moodle_url("http://www.gravatar.com/avatar/{$md5}", array('s' => $size, 'd' => $gravatardefault));
|
||||
|
||||
Reference in New Issue
Block a user