mirror of https://github.com/MISP/MISP
chg: remove obsolete functions
parent
fc5557519c
commit
a0b661eecb
|
@ -82,36 +82,4 @@ class EventDelegation extends AppModel {
|
|||
$event_id = $this->Event->savePreparedEvent($event);
|
||||
return $event_id;
|
||||
}
|
||||
|
||||
private function __prepareEvent(&$event) {
|
||||
$objects = array('Attribute', 'ShadowAttribute', 'EventTag');
|
||||
$objects = array(
|
||||
'Attribute' => array('id', 'event_id'),
|
||||
'EventTag' => array('id', 'event_id'),
|
||||
'ShadowAttribute' => array('id', 'event_id'),
|
||||
);
|
||||
$objectsWithAttachments = array('Attribute', 'ShadowAttribute');
|
||||
$objectsToRearrange = array('Attribute', 'ShadowAttribute', 'EventTag');
|
||||
unset($event['Event']['id']);
|
||||
foreach ($objects as $object_type => $fields) {
|
||||
foreach ($event[$object_type] as &$object) {
|
||||
// append attachment
|
||||
if (in_array($object_type, $objectsWithAttachments)) {
|
||||
if ($this->Event->Attribute->typeIsAttachment($object['type'])) {
|
||||
$encodedFile = $this->Event->$object_type->base64EncodeAttachment($object);
|
||||
$object['data'] = $encodedFile;
|
||||
}
|
||||
}
|
||||
|
||||
// unset ID fields and relations
|
||||
foreach ($fields as $field) {
|
||||
unset($object[$field]);
|
||||
}
|
||||
}
|
||||
if (in_array($object_type, $objectsToRearrange)) {
|
||||
$event['Event'][$object_type] = $event[$object_type];
|
||||
unset($event[$object_type]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,8 +61,4 @@ class Module extends AppModel {
|
|||
public function queryModule() {
|
||||
|
||||
}
|
||||
|
||||
private function queryModule() {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,10 +33,6 @@ class Warninglist extends AppModel{
|
|||
return true;
|
||||
}
|
||||
|
||||
public function checkValidTypeJSON($check) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function update() {
|
||||
$directories = glob(APP . 'files' . DS . 'warninglists' . DS . 'lists' . DS . '*', GLOB_ONLYDIR);
|
||||
$updated = array();
|
||||
|
|
Loading…
Reference in New Issue