aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2013-01-10 07:28:16 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2013-01-10 07:28:16 +0000
commit9938c667ccfeec0ed0558765da5d9dc7e48e0def (patch)
tree6040121d65eef17be88ef767f70b6c5f6d5a47a6
parent848128d2227c490c5c2fbcb298dbf4e589052115 (diff)
fixed a bug inside 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'];
+ }
}
}