mirror of https://github.com/MISP/MISP
Merge branch 'develop' of github.com:MISP/MISP into develop
commit
182e7aa87f
|
@ -273,7 +273,7 @@ class LogsController extends AppController
|
||||||
$this->set('actionDefinitions', $this->{$this->defaultModel}->actionDefinitions);
|
$this->set('actionDefinitions', $this->{$this->defaultModel}->actionDefinitions);
|
||||||
|
|
||||||
// reset the paginate_conditions
|
// reset the paginate_conditions
|
||||||
$this->Session->write('paginate_conditions_log', array());
|
//$this->Session->write('paginate_conditions_log', array());
|
||||||
if ($this->request->is('post')) {
|
if ($this->request->is('post')) {
|
||||||
$filters['email'] = $this->request->data['Log']['email'];
|
$filters['email'] = $this->request->data['Log']['email'];
|
||||||
if (!$orgRestriction) {
|
if (!$orgRestriction) {
|
||||||
|
@ -337,12 +337,11 @@ class LogsController extends AppController
|
||||||
$this->Session->write('paginate_conditions_log_model_id', $filters['model_id']);
|
$this->Session->write('paginate_conditions_log_model_id', $filters['model_id']);
|
||||||
$this->Session->write('paginate_conditions_log_title', $filters['title']);
|
$this->Session->write('paginate_conditions_log_title', $filters['title']);
|
||||||
$this->Session->write('paginate_conditions_log_change', $filters['change']);
|
$this->Session->write('paginate_conditions_log_change', $filters['change']);
|
||||||
$this->Session->write('paginate_conditions_log_change', $filters['from'] ?? null);
|
$this->Session->write('paginate_conditions_log_from', $filters['from'] ?? null);
|
||||||
$this->Session->write('paginate_conditions_log_change', $filters['to'] ?? null);
|
$this->Session->write('paginate_conditions_log_to', $filters['to'] ?? null);
|
||||||
if (Configure::read('MISP.log_client_ip')) {
|
if (Configure::read('MISP.log_client_ip')) {
|
||||||
$this->Session->write('paginate_conditions_log_ip', $filters['ip']);
|
$this->Session->write('paginate_conditions_log_ip', $filters['ip']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// set the same view as the index page
|
// set the same view as the index page
|
||||||
$this->render('index');
|
$this->render('index');
|
||||||
}
|
}
|
||||||
|
@ -355,12 +354,11 @@ class LogsController extends AppController
|
||||||
$filters['model_id'] = $this->Session->read('paginate_conditions_log_model_id');
|
$filters['model_id'] = $this->Session->read('paginate_conditions_log_model_id');
|
||||||
$filters['title'] = $this->Session->read('paginate_conditions_log_title');
|
$filters['title'] = $this->Session->read('paginate_conditions_log_title');
|
||||||
$filters['change'] = $this->Session->read('paginate_conditions_log_change');
|
$filters['change'] = $this->Session->read('paginate_conditions_log_change');
|
||||||
$filters['change'] = $this->Session->read('paginate_conditions_log_from') ?? null;
|
$filters['from'] = $this->Session->read('paginate_conditions_log_from') ?? null;
|
||||||
$filters['change'] = $this->Session->read('paginate_conditions_log_to') ?? null;
|
$filters['to'] = $this->Session->read('paginate_conditions_log_to') ?? null;
|
||||||
if (Configure::read('MISP.log_client_ip')) {
|
if (Configure::read('MISP.log_client_ip')) {
|
||||||
$filters['ip'] = $this->Session->read('paginate_conditions_log_ip');
|
$filters['ip'] = $this->Session->read('paginate_conditions_log_ip');
|
||||||
}
|
}
|
||||||
|
|
||||||
// for info on what was searched for
|
// for info on what was searched for
|
||||||
$this->set('emailSearch', $filters['email']);
|
$this->set('emailSearch', $filters['email']);
|
||||||
$this->set('orgSearch', $filters['org']);
|
$this->set('orgSearch', $filters['org']);
|
||||||
|
@ -378,7 +376,7 @@ class LogsController extends AppController
|
||||||
|
|
||||||
// re-get pagination
|
// re-get pagination
|
||||||
$this->{$this->defaultModel}->recursive = 0;
|
$this->{$this->defaultModel}->recursive = 0;
|
||||||
$this->paginate = array_merge_recursive($this->Session->read('paginate_conditions_log'), $this->paginate);
|
$this->paginate = array_replace_recursive($this->paginate, $this->Session->read('paginate_conditions_log'));
|
||||||
if (!isset($this->paginate['order'])) {
|
if (!isset($this->paginate['order'])) {
|
||||||
$this->paginate['order'] = array('Log.id' => 'DESC');
|
$this->paginate['order'] = array('Log.id' => 'DESC');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue