From 9938c667ccfeec0ed0558765da5d9dc7e48e0def Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Thu, 10 Jan 2013 07:28:16 +0000 Subject: fixed a bug inside SearchController.php --- h-source/Application/Controllers/SearchController.php | 9 +++++++-- 1 file 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']; + } } } -- cgit v1.2.3