mirror of https://github.com/MISP/MISP
fix: taxonomy view filter is not kept when switching pages, fixes #8875
parent
39d827baaa
commit
bc07446a82
|
@ -99,12 +99,12 @@ class TaxonomiesController extends AppController
|
|||
$taxonomy['entries'][$key]['events'] = $count;
|
||||
$taxonomy['entries'][$key]['attributes'] = $count_a;
|
||||
}
|
||||
$this->set('filter', $filter);
|
||||
$customPagination = new CustomPaginationTool();
|
||||
$params = $customPagination->createPaginationRules($taxonomy['entries'], $this->passedArgs, 'TaxonomyEntry');
|
||||
if ($params['sort'] == 'id') {
|
||||
$params['sort'] = 'tag';
|
||||
}
|
||||
$params['options'] = ['filter' => $filter];
|
||||
$this->params->params['paging'] = array($this->modelClass => $params);
|
||||
$params = $customPagination->applyRulesOnArray($taxonomy['entries'], $params, 'taxonomies');
|
||||
if ($this->_isRest()) {
|
||||
|
|
|
@ -191,7 +191,6 @@ echo $this->element('/genericElements/IndexTable/scaffold', ['scaffold_data' =>
|
|||
'paginatorOptions' => [
|
||||
'url' => [$taxonomy['id']]
|
||||
],
|
||||
'persistUrlParams' => ['filter']
|
||||
],
|
||||
'containerId' => 'preview_taxonomy_tags_container'
|
||||
]]);
|
||||
|
|
Loading…
Reference in New Issue