cleaned up attendant writing

This commit is contained in:
2026-01-30 15:18:26 -06:00
parent c9f46413fb
commit 6948df2357

View File

@@ -24,7 +24,6 @@ function main(): void {
blacklist_terms($pbdb);
filter_extensions($pbdb);
$mac_list = pull_mac_list();
foreach ($TARGET_EXTENSIONS as $ext) {
@@ -35,8 +34,8 @@ function main(): void {
$file = $PROVISION_DIR . '/' . $mac . '-features.cfg';
$xml = pull_xml_file($file);
$attendant = remove_attendants($xml);
write_attendants($attendant, $pbdb);
remove_attendants($xml);
write_attendants($xml, $pbdb);
write_to_file($file, $xml);
}
@@ -241,7 +240,7 @@ function remove_attendants($xml): DOMElement {
return $attendant;
}
function write_attendants($attendant, $pbdb): void {
function write_attendants($attendant, $pbdb) {
$index = 1;
foreach ($pbdb as $r) {
$label = trim((string)($r['name'] ?? ''));