mirror of https://github.com/MISP/MISP
chg: cleanup Sighting.php
parent
3d8cd2fb61
commit
6c07ae78fa
|
@ -1,6 +1,13 @@
|
|||
<?php
|
||||
|
||||
App::uses('AppModel', 'Model');
|
||||
class Sighting extends AppModel{
|
||||
|
||||
/**
|
||||
* Sighting Model
|
||||
*
|
||||
*/
|
||||
class Sighting extends AppModel {
|
||||
|
||||
public $useTable = 'sightings';
|
||||
public $recursive = -1;
|
||||
public $actsAs = array(
|
||||
|
@ -36,7 +43,7 @@ class Sighting extends AppModel{
|
|||
return true;
|
||||
}
|
||||
|
||||
public function attachToEvent(&$event, &$user, $eventOnly = false) {
|
||||
public function attachToEvent(&$event, &$user) {
|
||||
$ownEvent = false;
|
||||
if ($user['Role']['perm_site_admin'] || $event['Event']['org_id'] == $user['org_id']) $ownEvent = true;
|
||||
$conditions = array('Sighting.event_id' => $event['Event']['id']);
|
||||
|
|
Loading…
Reference in New Issue