mirror of https://github.com/MISP/MISP
fix: [internal] ThreatLevel::list() function renamed
- causes issues under certain PHP versions as it's a reserved keywordpull/7276/head
parent
6f18680083
commit
8f13e5f41a
|
@ -590,7 +590,7 @@ class EventsController extends AppController
|
||||||
$searchTermInternal = $searchTerm;
|
$searchTermInternal = $searchTerm;
|
||||||
if ($searchTerm == 'threatlevel') {
|
if ($searchTerm == 'threatlevel') {
|
||||||
$searchTermInternal = 'threat_level_id';
|
$searchTermInternal = 'threat_level_id';
|
||||||
$terms = $this->Event->ThreatLevel->list();
|
$terms = $this->Event->ThreatLevel->listThreatLevels();
|
||||||
} elseif ($searchTerm == 'analysis') {
|
} elseif ($searchTerm == 'analysis') {
|
||||||
$terms = $this->Event->analysisLevels;
|
$terms = $this->Event->analysisLevels;
|
||||||
} else {
|
} else {
|
||||||
|
@ -4759,7 +4759,7 @@ class EventsController extends AppController
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->set('events', $this->paginate());
|
$this->set('events', $this->paginate());
|
||||||
$this->set('threatLevels', $this->Event->ThreatLevel->list());
|
$this->set('threatLevels', $this->Event->ThreatLevel->listThreatLevels());
|
||||||
$this->set('eventDescriptions', $this->Event->fieldDescriptions);
|
$this->set('eventDescriptions', $this->Event->fieldDescriptions);
|
||||||
$this->set('analysisLevels', $this->Event->analysisLevels);
|
$this->set('analysisLevels', $this->Event->analysisLevels);
|
||||||
$this->set('distributionLevels', $this->Event->distributionLevels);
|
$this->set('distributionLevels', $this->Event->distributionLevels);
|
||||||
|
|
|
@ -694,7 +694,7 @@ class FeedsController extends AppController
|
||||||
}
|
}
|
||||||
$this->set('events', $events);
|
$this->set('events', $events);
|
||||||
$this->loadModel('Event');
|
$this->loadModel('Event');
|
||||||
$this->set('threatLevels', $this->Event->ThreatLevel->list());
|
$this->set('threatLevels', $this->Event->ThreatLevel->listThreatLevels());
|
||||||
$this->set('eventDescriptions', $this->Event->fieldDescriptions);
|
$this->set('eventDescriptions', $this->Event->fieldDescriptions);
|
||||||
$this->set('analysisLevels', $this->Event->analysisLevels);
|
$this->set('analysisLevels', $this->Event->analysisLevels);
|
||||||
$this->set('distributionLevels', $this->Event->distributionLevels);
|
$this->set('distributionLevels', $this->Event->distributionLevels);
|
||||||
|
|
|
@ -124,7 +124,7 @@ class ServersController extends AppController
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->loadModel('Event');
|
$this->loadModel('Event');
|
||||||
$this->set('threatLevels', $this->Event->ThreatLevel->list());
|
$this->set('threatLevels', $this->Event->ThreatLevel->listThreatLevels());
|
||||||
App::uses('CustomPaginationTool', 'Tools');
|
App::uses('CustomPaginationTool', 'Tools');
|
||||||
$customPagination = new CustomPaginationTool();
|
$customPagination = new CustomPaginationTool();
|
||||||
$params = $customPagination->createPaginationRules($events, $this->passedArgs, $this->alias);
|
$params = $customPagination->createPaginationRules($events, $this->passedArgs, $this->alias);
|
||||||
|
@ -202,7 +202,7 @@ class ServersController extends AppController
|
||||||
$this->set($alias, $currentModel->{$variable});
|
$this->set($alias, $currentModel->{$variable});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->set('threatLevels', $this->Event->ThreatLevel->list());
|
$this->set('threatLevels', $this->Event->ThreatLevel->listThreatLevels());
|
||||||
$this->set('title_for_layout', __('Remote event preview'));
|
$this->set('title_for_layout', __('Remote event preview'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ class ThreatLevel extends AppModel
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
public function list()
|
public function listThreatLevels()
|
||||||
{
|
{
|
||||||
return $this->find('list', [
|
return $this->find('list', [
|
||||||
'fields' => ['id', 'name'],
|
'fields' => ['id', 'name'],
|
||||||
|
|
Loading…
Reference in New Issue