DatafieldCategoryTable: fix SQL error on search

fixes #2367
This commit is contained in:
Thomas Gelf 2021-08-16 05:40:23 +02:00
parent 093abfd733
commit c822f3b981
2 changed files with 7 additions and 8 deletions

View File

@ -30,6 +30,7 @@ next (will be 1.9.0)
* FIX: allow switching DB config while connection is failing (#2300) * FIX: allow switching DB config while connection is failing (#2300)
* FIX: Links to duplicate services in Sets didn't check for deactivation (#2323) * FIX: Links to duplicate services in Sets didn't check for deactivation (#2323)
* FIX: SQL error for Data Fields table on PostgreSQL (#2310) * FIX: SQL error for Data Fields table on PostgreSQL (#2310)
* FIX: SQL error when searching for Data Field Categories (#2367)
* FEATURE: show "deprecated" flag on object attribute inspection (#2312) * FEATURE: show "deprecated" flag on object attribute inspection (#2312)
* FEATURE: Service Template for single Host services provides auto-completion (#1974) * FEATURE: Service Template for single Host services provides auto-completion (#1974)

View File

@ -5,15 +5,13 @@ namespace Icinga\Module\Director\Web\Table;
use gipfl\IcingaWeb2\Link; use gipfl\IcingaWeb2\Link;
use gipfl\IcingaWeb2\Table\ZfQueryBasedTable; use gipfl\IcingaWeb2\Table\ZfQueryBasedTable;
use ipl\Html\Html; use ipl\Html\Html;
use Zend_Db_Adapter_Abstract as ZfDbAdapter;
use Zend_Db_Select as ZfDbSelect;
class DatafieldCategoryTable extends ZfQueryBasedTable class DatafieldCategoryTable extends ZfQueryBasedTable
{ {
protected $searchColumns = array( protected $searchColumns = [
'dfc.varname', 'dfc.category_name',
'dfc.caption', 'dfc.description',
); ];
public function getColumns() public function getColumns()
{ {
@ -45,10 +43,10 @@ class DatafieldCategoryTable extends ZfQueryBasedTable
public function getColumnsToBeRendered() public function getColumnsToBeRendered()
{ {
return array( return [
$this->translate('Category Name'), $this->translate('Category Name'),
$this->translate('# Used'), $this->translate('# Used'),
); ];
} }
public function prepareQuery() public function prepareQuery()