This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
use App\Avatar;
|
use App\Avatar\Lorelei;
|
||||||
|
|
||||||
$seed = Avatar::normalizeSeed((string)($_GET['seed'] ?? 'papa-kind-treff'));
|
$seed = Lorelei::normalizeSeed((string)($_GET['seed'] ?? 'papa-kind-treff'));
|
||||||
$cacheDir = dirname(__DIR__, 3) . '/assets/avatars/dicebear-cache';
|
$cacheDir = dirname(__DIR__, 3) . '/assets/avatars/dicebear-cache';
|
||||||
|
|
||||||
if (!is_dir($cacheDir)) {
|
if (!is_dir($cacheDir)) {
|
||||||
@@ -31,7 +31,7 @@ if ($svg === false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!is_string($svg) || $svg === '') {
|
if (!is_string($svg) || $svg === '') {
|
||||||
$svg = Avatar::fallbackSvg($seed, 'Avatar');
|
$svg = Lorelei::fallbackSvg($seed, 'Avatar');
|
||||||
}
|
}
|
||||||
|
|
||||||
header('Content-Type: image/svg+xml; charset=utf-8');
|
header('Content-Type: image/svg+xml; charset=utf-8');
|
||||||
|
|||||||
Reference in New Issue
Block a user