(EventOverview/StateHistory)Form: Method `getValue()` expects only one param
This commit is contained in:
parent
4341a32c1f
commit
7cd89490cc
|
@ -97,19 +97,19 @@ class EventOverviewForm extends Form
|
|||
public function getFilter()
|
||||
{
|
||||
$filters = array();
|
||||
if ($this->getValue('statechange', 1)) {
|
||||
if ($this->getValue('statechange')) {
|
||||
$filters[] = $this->stateChangeFilter();
|
||||
}
|
||||
if ($this->getValue('comment', 1)) {
|
||||
if ($this->getValue('comment')) {
|
||||
$filters[] = $this->commentFilter();
|
||||
}
|
||||
if ($this->getValue('notification', 1)) {
|
||||
if ($this->getValue('notification')) {
|
||||
$filters[] = $this->notificationFilter();
|
||||
}
|
||||
if ($this->getValue('downtime', 1)) {
|
||||
if ($this->getValue('downtime')) {
|
||||
$filters[] = $this->downtimeFilter();
|
||||
}
|
||||
if ($this->getValue('flapping', 1)) {
|
||||
if ($this->getValue('flapping')) {
|
||||
$filters[] = $this->flappingFilter();
|
||||
}
|
||||
return Filter::matchAny($filters);
|
||||
|
|
|
@ -31,7 +31,7 @@ class StatehistoryForm extends Form
|
|||
Filter::expression('type', '=', 'hard_state')
|
||||
);
|
||||
|
||||
if ($this->getValue('objecttype', 'hosts') === 'hosts') {
|
||||
if ($this->getValue('objecttype') === 'hosts') {
|
||||
$objectTypeFilter = Filter::expression('object_type', '=', 'host');
|
||||
} else {
|
||||
$objectTypeFilter = Filter::expression('object_type', '=', 'service');
|
||||
|
@ -46,7 +46,7 @@ class StatehistoryForm extends Form
|
|||
'cnt_unknown_hard' => Filter::expression('state', '=', '3'),
|
||||
'cnt_ok' => Filter::expression('state', '=', '0')
|
||||
);
|
||||
$state = $this->getValue('state', 'cnt_critical_hard');
|
||||
$state = $this->getValue('state');
|
||||
$stateFilter = $states[$state];
|
||||
if (in_array($state, array('cnt_ok', 'cnt_up'))) {
|
||||
return Filter::matchAll($objectTypeFilter, $stateFilter);
|
||||
|
|
Loading…
Reference in New Issue