Updated device-groups functions to support returning all data or just group id

This commit is contained in:
laf
2015-12-13 17:20:34 +00:00
parent d0306ae8ae
commit d5b6e0e8da
2 changed files with 15 additions and 23 deletions

View File

@ -1024,7 +1024,7 @@ function get_device_groups() {
// use hostname as device_id if it's all digits
$device_id = ctype_digit($hostname) ? $hostname : getidbyname($hostname);
if (is_numeric($device_id)) {
$groups = GetFullGroupsFromDevice($device_id);
$groups = GetGroupsFromDevice($device_id,1);
}
else {
$groups = GetDeviceGroups();