Removed an accidental addition a while back

pull/796/head
iglocska 2015-12-21 10:38:45 +01:00
parent f963f8d7d8
commit 20acdd0622
2 changed files with 0 additions and 63 deletions

View File

@ -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) {
}
}

View File

@ -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;
}
}