@@ -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'] ?? ''));
|
||||||
|
|||||||
Reference in New Issue
Block a user