in light of the perf/size test results of Jdenticons, switch back to Identicons as the default

This commit is contained in:
El RIDO 2022-10-30 09:05:29 +01:00
parent 1892264cf0
commit 89d575ace3
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92
5 changed files with 10 additions and 17 deletions

View file

@ -165,7 +165,10 @@ class Comment extends AbstractModel
if ($icon != 'none') {
$pngdata = '';
$hmac = TrafficLimiter::getHash();
if ($icon == 'jdenticon') {
if ($icon == 'identicon') {
$identicon = new Identicon();
$pngdata = $identicon->getImageDataUri($hmac, 16);
} elseif ($icon == 'jdenticon') {
$jdenticon = new Jdenticon(array(
'hash' => $hmac,
'size' => 16,
@ -175,9 +178,6 @@ class Comment extends AbstractModel
),
));
$pngdata = $jdenticon->getImageDataUri('png');
} elseif ($icon == 'identicon') {
$identicon = new Identicon();
$pngdata = $identicon->getImageDataUri($hmac, 16);
} elseif ($icon == 'vizhash') {
$vh = new Vizhash16x16();
$pngdata = 'data:image/png;base64,' . base64_encode(