mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Fix not working code (#1087)
This commit is contained in:
parent
ba358f96ee
commit
4b397efb9a
2 changed files with 3 additions and 8 deletions
|
@ -117,7 +117,7 @@ if ($client_full || !$stats_cache = CACHE('tr_cache')->get('tracker_clients_stat
|
|||
|
||||
$n = 1;
|
||||
foreach (array_slice($clients_percentage, 0, $numwant) as $client => $value) {
|
||||
$client_list .= ($client_full) ? ("$client => $value<br>") : "$n. " . get_user_torrent_client($client) . " => $value<br>";
|
||||
$client_list .= ($client_full) ? ("$client => $value<br>") : "$n. " . get_user_torrent_client($client) . " $value<br>";
|
||||
$n++;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue