Revert "cleaned up attendant writing"

This reverts commit 6948df2357.
This commit is contained in:
2026-01-30 16:31:06 -06:00
parent 6948df2357
commit ef7dc8ff09

View File

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