mirror of https://github.com/MISP/MISP
fix: [statistics] fixed an issue where the org statistics didn't correctly apply the local filters
- both local and external just showed the sum totals instead of the individual poolspull/3582/head
parent
e1fc7b2e50
commit
12ac58f0e1
|
@ -1701,7 +1701,7 @@ class UsersController extends AppController
|
|||
);
|
||||
$scopes = array(
|
||||
'user' => array(
|
||||
'conditions' => null,
|
||||
'conditions' => array(),
|
||||
'model' => 'User',
|
||||
'date_created' => 'timestamp'
|
||||
),
|
||||
|
@ -1726,7 +1726,7 @@ class UsersController extends AppController
|
|||
if ($scope_data['date_created'] === 'datetime') {
|
||||
$condition = date('Y-m-d H:i:s', $condition);
|
||||
}
|
||||
$params['conditions'] = array($scope_data['model'] . '.date_created >=' => $condition);
|
||||
$params['conditions'] = array_merge($scopes[$scope]['conditions'], array($scope_data['model'] . '.date_created >=' => $condition));
|
||||
}
|
||||
$statistics[$scope]['data'][$range] = $this->{$scope_data['model']}->find('count', $params);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue