mirror of https://github.com/MISP/MISP
Removed an accidental addition a while back
parent
f963f8d7d8
commit
20acdd0622
|
@ -1,31 +0,0 @@
|
|||
<?php
|
||||
App::uses('AppController', 'Controller');
|
||||
|
||||
class SightingsController extends AppController {
|
||||
public $components = array('Session', 'RequestHandler');
|
||||
|
||||
public function beforeFilter() {
|
||||
parent::beforeFilter();
|
||||
}
|
||||
|
||||
public $paginate = array(
|
||||
'limit' => 60,
|
||||
'maxLimit' => 9999, // LATER we will bump here on a problem once we have more than 9999 events <- no we won't, this is the max a user van view/page.
|
||||
'order' => array(
|
||||
'Sighting.created' => 'DESC'
|
||||
),
|
||||
);
|
||||
|
||||
public function index() {
|
||||
}
|
||||
|
||||
public function add() {
|
||||
}
|
||||
|
||||
public function edit($id) {
|
||||
}
|
||||
|
||||
public function delete($id) {
|
||||
|
||||
}
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
<?php
|
||||
App::uses('AppModel', 'Model');
|
||||
class Sighting extends AppModel{
|
||||
public $useTable = 'sightings';
|
||||
public $recursive = -1;
|
||||
public $actsAs = array(
|
||||
'Containable',
|
||||
);
|
||||
|
||||
public $validate = array(
|
||||
'event_uuid' => array(
|
||||
'unique' => array(
|
||||
'rule' => 'isUnique',
|
||||
'message' => 'Event already blacklisted.'
|
||||
),
|
||||
'uuid' => array(
|
||||
'rule' => array('uuid'),
|
||||
'message' => 'Please provide a valid UUID'
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
public function beforeValidate($options = array()) {
|
||||
parent::beforeValidate();
|
||||
$date = date('Y-m-d H:i:s');
|
||||
if (empty($this->data['Sighting']['id'])) {
|
||||
$this->data['Sighting']['date_created'] = $date;
|
||||
}
|
||||
$this->data['Sighting']['date_modified'] = $date;
|
||||
return true;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue