summaryrefslogtreecommitdiffstats
path: root/modules-available/rebootcontrol/inc/rebootqueries.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/rebootcontrol/inc/rebootqueries.inc.php')
-rw-r--r--modules-available/rebootcontrol/inc/rebootqueries.inc.php29
1 files changed, 0 insertions, 29 deletions
diff --git a/modules-available/rebootcontrol/inc/rebootqueries.inc.php b/modules-available/rebootcontrol/inc/rebootqueries.inc.php
deleted file mode 100644
index c0c479bd..00000000
--- a/modules-available/rebootcontrol/inc/rebootqueries.inc.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-
-class RebootQueries
-{
-
- /**
- * Get machines by list of UUIDs
- * @param string[] $list list of system UUIDs
- * @return array list of machines with machineuuid, hostname, clientip, state and locationid
- */
- public static function getMachinesByUuid($list, $assoc = false, $columns = ['machineuuid', 'hostname', 'clientip', 'state', 'locationid'])
- {
- if (empty($list))
- return array();
- if (is_array($columns)) {
- $columns = implode(',', $columns);
- }
- $res = Database::simpleQuery("SELECT $columns FROM machine
- WHERE machineuuid IN (:list)", compact('list'));
- if (!$assoc)
- return $res->fetchAll(PDO::FETCH_ASSOC);
- $ret = [];
- while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
- $ret[$row['machineuuid']] = $row;
- }
- return $ret;
- }
-
-} \ No newline at end of file