mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-20 13:24:01 -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;
|
$n = 1;
|
||||||
foreach (array_slice($clients_percentage, 0, $numwant) as $client => $value) {
|
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++;
|
$n++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1236,13 +1236,8 @@ function get_user_torrent_client(string $peerId): mixed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($bestMatchLength) && !empty($bestMatch)) {
|
if (!empty($bestMatch)) {
|
||||||
$clientIconPath = 'styles/images/clients/' . $bestMatch . $iconExtension;
|
return '<img width="auto" height="auto" style="display:inline!important;vertical-align:middle" src="/styles/images/clients/'. $bestMatch . $iconExtension . '" alt="' . $bestMatch . '" title="' . $peerId . '">';
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $peerId;
|
return $peerId;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue