diff options
Diffstat (limited to 'modules-available/statistics/inc/hardwareinfo.inc.php')
-rw-r--r-- | modules-available/statistics/inc/hardwareinfo.inc.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules-available/statistics/inc/hardwareinfo.inc.php b/modules-available/statistics/inc/hardwareinfo.inc.php index df33a5f6..6ca070ee 100644 --- a/modules-available/statistics/inc/hardwareinfo.inc.php +++ b/modules-available/statistics/inc/hardwareinfo.inc.php @@ -12,6 +12,7 @@ class HardwareInfo const PCI_DEVICE = 'PCI_DEVICE'; const HDD = 'HDD'; const CPU = 'CPU'; + const SCREEN = 'SCREEN'; /** * Get a KCL modification string for the given machine, enabling GVT, PCI passthrough etc. @@ -44,7 +45,7 @@ class HardwareInfo return ''; $hw = new HardwareQuery(self::PCI_DEVICE, $best['machineuuid'], true); // TODO: Get list of enabled pass through groups for this client's location - $hw->addJoin(true, '@PASSTHROUGH', 'passthrough_group_x_location', 'groupid', + $hw->addForeignJoin(true, '@PASSTHROUGH', 'passthrough_group_x_location', 'groupid', 'locationid', $locations); $hw->addGlobalColumn('vendor'); $hw->addGlobalColumn('device'); @@ -77,7 +78,7 @@ class HardwareInfo foreach (array_keys($slots) as $slot) { //error_log('Querying slot ' . $slot); $hw = new HardwareQuery(self::PCI_DEVICE, $best['machineuuid'], true); - $hw->addWhere(false, 'slot', 'LIKE', $slot . '.%'); + $hw->addLocalColumn('slot')->addCondition('LIKE', $slot . '.%'); $hw->addGlobalColumn('vendor'); $hw->addGlobalColumn('device'); foreach ($hw->query() as $row) { |