From 10bbe357616c36e86ae3c3c7a26840b0c1973756 Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Wed, 2 Feb 2011 14:29:55 +0000 Subject: improved search --- h-source/Application/Controllers/SearchController.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'h-source/Application/Controllers/SearchController.php') diff --git a/h-source/Application/Controllers/SearchController.php b/h-source/Application/Controllers/SearchController.php index 21b3a2e..a65ba62 100644 --- a/h-source/Application/Controllers/SearchController.php +++ b/h-source/Application/Controllers/SearchController.php @@ -236,6 +236,25 @@ class SearchController extends BaseController } $whereString = "'".implode("','",$vendorIDProductIDArray)."'"; $data['table'] = $this->m['HardwareModel']->select()->where(array('pci_id'=>"in($whereString)"))->send(); + + $foundPciidArray = $this->m['HardwareModel'] + ->select('pci_id') + ->where(array('pci_id'=>"in($whereString)")) + ->toList('pci_id') + ->send(); + + $notFoundDevices = array(); + + foreach ($lspciFiltered as $device) + { + if (!in_array($device['vendorId'].":".$device['deviceId'],$foundPciidArray)) + { + $notFoundDevices[] = $device; + } + } + + $data['notFoundDevices'] = $notFoundDevices; + } $this->append($data); $this->cleverLoad('lspci_results'); -- cgit v1.2.3