From 025019a7a7da442648855716c6eb77e5ce5e627e Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 12 Oct 2017 16:14:12 +0200 Subject: [runmode] Return lastseen too in detailed mode --- modules-available/runmode/inc/runmode.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules-available/runmode') diff --git a/modules-available/runmode/inc/runmode.inc.php b/modules-available/runmode/inc/runmode.inc.php index bf20596b..780f12c9 100644 --- a/modules-available/runmode/inc/runmode.inc.php +++ b/modules-available/runmode/inc/runmode.inc.php @@ -93,7 +93,8 @@ class RunMode * @param string $modeId * @param bool $detailed whether to return meta data about machine, not just machineuuid * @param bool $assoc use machineuuid as array key - * @return array , value={'machineuuid', 'modedata', <'hostname', 'clientip', 'macaddr', 'locationid'>} + * @return array , value={'machineuuid', 'modedata', + * <'hostname', 'clientip', 'macaddr', 'locationid', 'lastseen'>} */ public static function getForMode($module, $modeId, $detailed = false, $assoc = false) { @@ -101,7 +102,7 @@ class RunMode $module = $module->getIdentifier(); } if ($detailed) { - $sel = ', m.hostname, m.clientip, m.macaddr, m.locationid'; + $sel = ', m.hostname, m.clientip, m.macaddr, m.locationid, m.lastseen'; $join = 'INNER JOIN machine m USING (machineuuid)'; } else { $join = $sel = ''; -- cgit v1.2.3-55-g7522