Profiler/Misc

* fix realm selection in profiler filters
 * minor cleanup of prQueue
This commit is contained in:
Sarjuuk
2025-06-17 17:28:21 +02:00
parent 91bb53aa1d
commit cd94a2fa4e
5 changed files with 52 additions and 97 deletions

View File

@@ -918,6 +918,37 @@ trait sourceHelper
}
}
trait TrProfilerFilter
{
protected function cbRegionCheck(string &$v) : bool
{
if (in_array($v, Util::$regions))
{
$this->parentCats[0] = $v; // directly redirect onto this region
$v = ''; // remove from filter
return true;
}
return false;
}
protected function cbServerCheck(string &$v) : bool
{
foreach (Profiler::getRealms() as $realm)
{
if (Profiler::urlize($realm['name']) != $v)
continue;
$this->parentCats[1] = $v; // directly redirect onto this server
$v = ''; // remove from filter
return true;
}
return false;
}
}
abstract class Filter
{