diff options
Diffstat (limited to 'h-source/Application')
-rw-r--r-- | h-source/Application/Controllers/SearchController.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/h-source/Application/Controllers/SearchController.php b/h-source/Application/Controllers/SearchController.php index 50e8284..ca798d6 100644 --- a/h-source/Application/Controllers/SearchController.php +++ b/h-source/Application/Controllers/SearchController.php @@ -255,13 +255,18 @@ class SearchController extends BaseController ->toList('pci_id') ->send(); - $notFoundDevices = array(); + $notFoundDevices = array(); //list of devices not found inside the database + $notFoundPciIdList = array(); //to check that it does not take the same device twice foreach ($lspciFiltered as $device) { if (!in_array($device['vendorId'].":".$device['deviceId'],$foundPciidArray)) { - $notFoundDevices[] = $device; + if (!in_array($device['vendorId'].":".$device['deviceId'],$notFoundPciIdList)) + { + $notFoundDevices[] = $device; + $notFoundPciIdList[] = $device['vendorId'].":".$device['deviceId']; + } } } |