mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-08-20 10:02:05 -05:00
Support specifying prefixes in ladder/*.json requests (#1832)
This commit is contained in:
@@ -52,7 +52,8 @@ if (isset($_REQUEST['json'])) {
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
if (!$formatid) die('null');
|
||||
$ladder = new NTBBLadder($formatid);
|
||||
$toplist = $ladder->getTop();
|
||||
$prefix = $_REQUEST['prefix'] ?? null;
|
||||
$toplist = $ladder->getTop($prefix);
|
||||
foreach ($toplist as &$row) {
|
||||
unset($row['formatid']);
|
||||
unset($row['entryid']);
|
||||
|
||||
Reference in New Issue
Block a user