diff options
author | Antonio Gallo <tonicucoz@gmail.com> | 2011-02-02 14:29:55 +0000 |
---|---|---|
committer | Antonio Gallo <tonicucoz@gmail.com> | 2011-02-02 14:29:55 +0000 |
commit | 10bbe357616c36e86ae3c3c7a26840b0c1973756 (patch) | |
tree | f0d588a10213ee9b91e12af0592112c1964e3755 /h-source/Application/Controllers/SearchController.php | |
parent | 662e663843729d20aef25743f1d3f58adf6865b5 (diff) |
improved search
Diffstat (limited to 'h-source/Application/Controllers/SearchController.php')
-rw-r--r-- | h-source/Application/Controllers/SearchController.php | 19 |
1 files changed, 19 insertions, 0 deletions
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'); |