From 6948df235722585c04aef66085da71537215b094 Mon Sep 17 00:00:00 2001 From: poslop Date: Fri, 30 Jan 2026 15:18:26 -0600 Subject: [PATCH] cleaned up attendant writing --- gen_pc_sidecar.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gen_pc_sidecar.php b/gen_pc_sidecar.php index 97983c4..12cbfb6 100755 --- a/gen_pc_sidecar.php +++ b/gen_pc_sidecar.php @@ -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'] ?? ''));