- FilterWidget now loads filter from DB only the first time

- Changed the query statement to load data from logs and person data
This commit is contained in:
Paolo
2017-12-21 16:26:23 +01:00
parent ada1108095
commit 628908b9e8
3 changed files with 30 additions and 26 deletions
@@ -23,17 +23,9 @@ class InfoCenter extends VileSci_Controller
$listFiltersSent = array();
$listFiltersNotSent = array();
$personActionsArray = array(
'app' => 'aufnahme',
'dataset_name' => 'PersonActions',
'person_id' => null,
'default_filter' => false,
'array_length(description, 1) >' => 0
);
$listFiltersSent = $this->_getFilterList('%InfoCenterSentApplication%');
$listFiltersSent = $this->_getFilterList($personActionsArray, '%InfoCenterSentApplication%');
$listFiltersNotSent = $this->_getFilterList($personActionsArray, '%InfoCenterNotSentApplication%');
$listFiltersNotSent = $this->_getFilterList('%InfoCenterNotSentApplication%');
$this->load->view(
'system/infocenter/infocenter.php',
@@ -47,10 +39,18 @@ class InfoCenter extends VileSci_Controller
/**
*
*/
private function _getFilterList($personActionsArray, $filter_kurzbz)
private function _getFilterList($filter_kurzbz)
{
$listFilters = array();
$personActionsArray = array(
'app' => 'aufnahme',
'dataset_name' => 'PersonActions',
'person_id' => null,
'default_filter' => false,
'array_length(description, 1) >' => 0
);
$this->FiltersModel->resetQuery();
$this->FiltersModel->addSelect('filter_id, description');
$this->FiltersModel->addOrder('sort', 'ASC');