Cache xface images based on hash of X-Face instead of mid

This commit is contained in:
Retro_Guy 2021-10-30 05:00:31 +00:00
parent eaba9ea4ec
commit 2197f3da85
1 changed files with 1 additions and 1 deletions

View File

@ -624,7 +624,7 @@ function message_show($group,$id,$attachment=0,$article_data=false,$maxlen=false
show_header($head,$group,$local_poster);
// X-Face
if ($face = display_full_headers($head->number,$group,$head->name,$head->from,true)) {
$pngfile = '../tmp/face-'.preg_replace("/[^A-Za-z0-9 ]/", '', $head->id);
$pngfile = '../tmp/face-'.hash('ripemd160', $face);
if(file_exists($pngfile)) {
echo '<img align="right" src="'.$pngfile.'">';
} else {