Fix not working code (#1087)

This commit is contained in:
Cønstantine Kovalensky 2023-11-12 22:06:05 +04:00 committed by GitHub
commit 4b397efb9a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 8 deletions

View file

@ -1236,13 +1236,8 @@ function get_user_torrent_client(string $peerId): mixed
}
}
if (!empty($bestMatchLength) && !empty($bestMatch)) {
$clientIconPath = 'styles/images/clients/' . $bestMatch . $iconExtension;
if (is_file($clientIconPath)) {
return '<img width="auto" height="auto" style="display: inline !important; vertical-align: middle;" src="' . $clientIconPath . '" alt="' . $bestMatch . '" title="' . $peerId . '">';
} else {
return $bestMatch;
}
if (!empty($bestMatch)) {
return '<img width="auto" height="auto" style="display:inline!important;vertical-align:middle" src="/styles/images/clients/'. $bestMatch . $iconExtension . '" alt="' . $bestMatch . '" title="' . $peerId . '">';
}
return $peerId;