Profiler/Realms

* generally allow all realm types
 * filter visibility/access by userGroup
This commit is contained in:
Sarjuuk
2024-05-12 14:32:12 +02:00
parent b2690aea08
commit a97cede1e0
14 changed files with 80 additions and 37 deletions

View File

@@ -300,7 +300,7 @@ function setup() : void
$res = call_user_func($step[0], $step[1]);
else
{
$args = &$step[1];
$args = &$step[1]; // see: https://github.com/php/php-src/issues/14202
$res = $step[0]($args);
}

View File

@@ -55,7 +55,7 @@ if (!CLI)
if ($idx !== false)
{
$set |= (1 << $idx);
$subs[$idx][] = [Profiler::urlize($row['name'], true), $row['name']];
$subs[$idx][] = [Profiler::urlize($row['name'], true), $row['name'], null, null, $row['access'] ? ['requiredAccess' => $row['access']] : null];
}
}

View File

@@ -35,6 +35,9 @@ if (!CLI)
// foreach ($realms as &$r)
// $r['battlegroup'] = CFG_BATTLEGROUP;
// remove access column
array_walk($realms, function (&$x) { unset($x['access']); });
$toFile = "var g_realms = ".Util::toJSON($realms).";";
$file = 'datasets/realms';