Skip to content

Commit

Permalink
Repository: Do not return filter columns when requiring all query col…
Browse files Browse the repository at this point in the history
…umns

I really wonder why I did not notice this until now...

refs #8826
  • Loading branch information
Johannes Meyer committed May 29, 2015
1 parent a88037f commit 3959dc2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion library/Icinga/Repository/Repository.php
Expand Up @@ -653,7 +653,15 @@ public function requireAllQueryColumns($table)
throw new ProgrammingError('Table name "%s" not found', $table);
}

return $queryColumns[$table];
$filterColumns = $this->getFilterColumns();
$columns = array();
foreach ($queryColumns[$table] as $alias => $column) {
if (! in_array(is_string($alias) ? $alias : $column, $filterColumns)) {
$columns[$alias] = $column;
}
}

return $columns;
}

/**
Expand Down

0 comments on commit 3959dc2

Please sign in to comment.