aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Controllers/SearchController.php
diff options
context:
space:
mode:
Diffstat (limited to 'h-source/Application/Controllers/SearchController.php')
-rw-r--r--h-source/Application/Controllers/SearchController.php9
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'];
+ }
}
}