chg: cleanup Sighting.php

pull/1460/head
Andreas Ziegler 2016-08-21 23:53:56 +02:00
parent 3d8cd2fb61
commit 6c07ae78fa
1 changed files with 9 additions and 2 deletions

View File

@ -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']);