add daily cache breakage to gravatars

This commit is contained in:
Shish 2012-12-30 18:08:58 +00:00
parent 6a5b92502b
commit 78442e96c3
2 changed files with 4 additions and 2 deletions

View file

@ -165,7 +165,8 @@ class User {
$s = $config->get_string("avatar_gravatar_size");
$d = urlencode($config->get_string("avatar_gravatar_default"));
$r = $config->get_string("avatar_gravatar_rating");
return "<img class=\"avatar gravatar\" src=\"http://www.gravatar.com/avatar/$hash.jpg?s=$s&d=$d&r=$r\">";
$cb = date("Y-m-d");
return "<img class=\"avatar gravatar\" src=\"http://www.gravatar.com/avatar/$hash.jpg?s=$s&d=$d&r=$r&cacheBreak=$cb\">";
}
}
return "";

View file

@ -253,7 +253,8 @@ class CommentListTheme extends Themelet {
$h_avatar = "";
if(!empty($comment->owner_email)) {
$hash = md5(strtolower($comment->owner_email));
$h_avatar = "<img src=\"http://www.gravatar.com/avatar/$hash.jpg?1\"><br>";
$cb = date("Y-m-d");
$h_avatar = "<img src=\"http://www.gravatar.com/avatar/$hash.jpg?cacheBreak=$cb\"><br>";
}
$h_reply = " - <a href='javascript: replyTo($i_image_id, $i_comment_id, \"$h_name\")'>Reply</a>";
$h_ip = $user->can("view_ip") ? "<br>".show_ip($comment->poster_ip, "Comment posted {$comment->posted}") : "";