Browse files

MDL-35669 gravatar Fix secure image urls.

  • Loading branch information...
1 parent ee3502e commit b96a15cc11da918ed611310b9ab2b0be6ba23fd2 @stronk7 stronk7 committed Oct 1, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/outputcomponents.php
View
1 lib/outputcomponents.php
@@ -400,6 +400,7 @@ public function get_url(moodle_page $page, renderer_base $renderer = null) {
// 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.
return new moodle_url("https://secure.gravatar.com/avatar/{$md5}", array('s' => $size, 'd' => $gravatardefault));
} else {
return new moodle_url("http://www.gravatar.com/avatar/{$md5}", array('s' => $size, 'd' => $gravatardefault));

0 comments on commit b96a15c

Please sign in to comment.