--- class.cdrule.php.orig 2014-01-20 11:37:39.000000000 -0600 +++ class.cdrule.php 2014-01-20 11:46:05.000000000 -0600 @@ -309,7 +309,7 @@ if(!is_null($options['selectDChecks'])){ $obj_params = array( 'nodeids' => $nodeids, - 'dhostids' => $dhostids, + 'druleids' => $druleids, 'preservekeys' => 1 ); @@ -319,17 +319,17 @@ if(!is_null($options['limitSelects'])) order_result($dchecks, 'name'); foreach($dchecks as $dcheckid => $dcheck){ - unset($dchecks[$dcheckid]['dhosts']); + unset($dchecks[$dcheckid]['drules']); $count = array(); - foreach($dcheck['dhosts'] as $dnum => $dhost){ + foreach($dcheck['drules'] as $dnum => $drule){ if(!is_null($options['limitSelects'])){ - if(!isset($count[$dhost['dhostid']])) $count[$dhost['dhostid']] = 0; - $count[$dhost['dhostid']]++; + if(!isset($count[$drule['druleid']])) $count[$drule['druleid']] = 0; + $count[$drule['druleid']]++; - if($count[$dhost['dhostid']] > $options['limitSelects']) continue; + if($count[$drule['druleid']] > $options['limitSelects']) continue; } - $result[$dhost['dhostid']]['dchecks'][] = &$dchecks[$dcheckid]; + $result[$drule['druleid']]['dchecks'][] = &$dchecks[$dcheckid]; } } }