Fix AlarmedZoneId filter term not working because I wrote AlarmZoneId instead

This commit is contained in:
Isaac Connor 2021-05-02 13:38:06 -04:00
parent 91a09608ea
commit 44e8107cac
1 changed files with 10 additions and 6 deletions

View File

@ -148,15 +148,14 @@ class FilterTerm {
} # end function sql_values
public function sql_operator() {
switch ( $this->attr ) {
case 'AlarmZoneId':
switch ($this->attr) {
case 'AlarmedZoneId':
return ' EXISTS ';
case 'ExistsInFileSystem':
case 'DiskPercent':
return '';
}
switch ( $this->op ) {
case '=' :
case '!=' :
@ -201,13 +200,17 @@ class FilterTerm {
$sql = '';
if ( isset($this->cnj) ) {
$sql .= ' '.$this->cnj.' ';
$sql .= ' '.$this->cnj;
}
if ( isset($this->obr) ) {
$sql .= ' '.str_repeat('(', $this->obr).' ';
$sql .= ' '.str_repeat('(', $this->obr);
}
$sql .= ' ';
switch ( $this->attr ) {
case 'AlarmedZoneId':
$sql .= '/* AlarmedZoneId */ ';
break;
case 'ExistsInFileSystem':
case 'DiskPercent':
$sql .= 'TRUE /*'.$this->attr.'*/';
@ -307,8 +310,9 @@ class FilterTerm {
}
if ( isset($this->cbr) ) {
$sql .= ' '.str_repeat(')', $this->cbr).' ';
$sql .= ' '.str_repeat(')', $this->cbr);
}
$sql .= PHP_EOL;
return $sql;
} # end public function sql