Put each page's settings on that page

A watchdog threshold was reachable only from the bottom of a list of a hundred
and twenty on another tab.
This commit is contained in:
Gmer4Lfe
2026-08-12 19:55:51 -04:00
parent 8ca52c64b9
commit e64d26af6c
13 changed files with 284 additions and 151 deletions
+6 -1
View File
@@ -71,8 +71,13 @@ foreach (VV_UI_SECTION_SURFACES as $surface) {
// "*" is the catch-all, matched the same way api/confform.php matches it. preg_quote would
// turn it into \* and quietly match nothing, which is how the map went on reporting a third
// of the conf as unreachable after the page that reaches it had shipped.
// Same matching as api/confform.php, including the pipe-separated form — the map and the page
// must agree about which sections a surface shows, or the route it prints is fiction.
$all = ((string) $surface['match'] === '*');
$re = $all ? '' : '/\b' . preg_quote((string) $surface['match'], '/') . '\b/i';
$re = $all ? '' : '/\b(' . implode('|', array_map(
fn($w) => preg_quote(trim($w), '/'),
array_filter(explode('|', (string) $surface['match']), fn($w) => trim($w) !== '')))
. ')\b/i';
foreach ($sections as $k => $g) {
$name = (string) $g['subsection'];
if (isset(VV_UI_SECTION_EXCLUDE[$name])) continue;