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