mirror of https://github.com/MISP/MISP
fix: [benchmarking] speculative fix for using db settings and benchmarking, fixes #9702
- causes issues for some users, couldn't reproduce it, but addressed the potential issuespull/9176/merge
parent
85062915a6
commit
fa9ff6f88e
|
@ -108,6 +108,11 @@ class AppController extends Controller
|
|||
|
||||
public function beforeFilter()
|
||||
{
|
||||
if (Configure::read('MISP.system_setting_db')) {
|
||||
App::uses('SystemSetting', 'Model');
|
||||
SystemSetting::setGlobalSetting();
|
||||
}
|
||||
|
||||
$this->User = ClassRegistry::init('User');
|
||||
if (Configure::read('Plugin.Benchmarking_enable')) {
|
||||
App::uses('BenchmarkTool', 'Tools');
|
||||
|
@ -117,11 +122,6 @@ class AppController extends Controller
|
|||
$controller = $this->request->params['controller'];
|
||||
$action = $this->request->params['action'];
|
||||
|
||||
if (Configure::read('MISP.system_setting_db')) {
|
||||
App::uses('SystemSetting', 'Model');
|
||||
SystemSetting::setGlobalSetting();
|
||||
}
|
||||
|
||||
$this->_setupBaseurl();
|
||||
$this->Auth->loginRedirect = $this->baseurl . '/users/routeafterlogin';
|
||||
|
||||
|
@ -879,7 +879,7 @@ class AppController extends Controller
|
|||
public function afterFilter()
|
||||
{
|
||||
// benchmarking
|
||||
if (Configure::read('Plugin.Benchmarking_enable')) {
|
||||
if (Configure::read('Plugin.Benchmarking_enable') && isset($this->Benchmark)) {
|
||||
$this->Benchmark->stopBenchmark([
|
||||
'user' => $this->Auth->user('id'),
|
||||
'controller' => $this->request->params['controller'],
|
||||
|
|
Loading…
Reference in New Issue