mirror of https://github.com/MISP/MISP
implemented relations dynamically
parent
84ebbea07c
commit
c1e5bdb271
|
@ -1,37 +0,0 @@
|
|||
<?php
|
||||
|
||||
class RelationsController extends AppController {
|
||||
|
||||
var $name = 'Relations';
|
||||
|
||||
function index() {
|
||||
$this->Relations->find('all');
|
||||
debug($this);
|
||||
|
||||
}
|
||||
|
||||
// /**
|
||||
// * Updates the relations table for a specific Signature
|
||||
// * @param unknown_type $id
|
||||
// */
|
||||
// function _updateForSignature($id) {
|
||||
// // remove all entries in the relations table
|
||||
// // remove all entries where signature_id
|
||||
// // remove all entries where event_id
|
||||
|
||||
// // search for similar signatures
|
||||
|
||||
|
||||
// // create new entries
|
||||
// }
|
||||
|
||||
function _getRelationsForEvent($id) {
|
||||
// get relations_id from Relations for event_id
|
||||
|
||||
// get event_id[] from Relations for relations_id
|
||||
|
||||
// perhaps write a subquery ?
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
<?php
|
||||
|
||||
class Relation extends AppModel {
|
||||
var $name = 'Relation';
|
||||
var $validate = array(
|
||||
'signature_id' => array(
|
||||
'notempty' => array(
|
||||
'rule' => array('notempty'),
|
||||
),
|
||||
),
|
||||
'event_id' => array(
|
||||
'notempty' => array(
|
||||
'rule' => array('notempty'),
|
||||
),
|
||||
),
|
||||
'relation_id' => array(
|
||||
'notempty' => array(
|
||||
'rule' => array('notempty'),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
// We explicitly have no relations
|
||||
var $belongsTo = array(
|
||||
|
||||
);
|
||||
|
||||
var $hasMany = array(
|
||||
|
||||
);
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue