aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Models/HardwareModel.php
diff options
context:
space:
mode:
Diffstat (limited to 'h-source/Application/Models/HardwareModel.php')
-rw-r--r--h-source/Application/Models/HardwareModel.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/h-source/Application/Models/HardwareModel.php b/h-source/Application/Models/HardwareModel.php
index d5aaffb..9a40e4b 100644
--- a/h-source/Application/Models/HardwareModel.php
+++ b/h-source/Application/Models/HardwareModel.php
@@ -282,6 +282,18 @@ class HardwareModel extends Model_Map {
return $name;
}
+ //get the model info by the vendorid:productid code
+ public function getModelByCode($code)
+ {
+ $res = $this->clear()->where(array('pci_id'=>sanitizePciid($code)))->send();
+
+ if (count($res) > 0)
+ {
+ return $res[0]['hardware'];
+ }
+ return false;
+ }
+
//save in the history all the action carried out by users
protected function updateHistory($action)
{