No more need for special treatment for some columns, as we can create filter* functions

This commit is contained in:
Thomas Gelf 2013-08-20 22:47:02 +02:00 committed by Eric Lippmann
parent 830b178e37
commit f3eedd919f
1 changed files with 1 additions and 7 deletions

View File

@ -133,18 +133,12 @@ abstract class AbstractQuery extends Query
protected function applyAllFilters()
{
$filters = array();
// TODO: Handle $special in a more generic way
$special = array('hostgroups', 'servicegroups');
foreach ($this->filters as $f) {
$alias = $f[0];
$value = $f[1];
$this->requireColumn($alias);
if ($alias === 'hostgroups') {
$col = 'hg.alias';
} elseif ($alias === 'servicegroups') {
$col = 'sg.alias';
} elseif ($this->isCustomvar($alias)) {
if ($this->isCustomvar($alias)) {
$col = $this->getCustomvarColumnName($alias);
} elseif ($this->hasAliasName($alias)) {
$col = $this->aliasToColumnName($alias);