chg: remove redundant className attributes

pull/1503/head
Andreas Ziegler 2016-09-06 23:14:48 +02:00
parent 90c28602c3
commit b4b9a35de3
6 changed files with 9 additions and 30 deletions

View File

@ -17,7 +17,6 @@ class NewsController extends AppController {
);
public function index() {
$this->News->bindModel(array('belongsTo' => array('User' => array('className' => 'User'))));
$this->paginate['contain'] = array('User' => array('fields' => array('User.email')));
$newsItems = $this->paginate();
$this->loadModel('User');

View File

@ -19,18 +19,14 @@ class EventDelegation extends AppModel {
);
public $belongsTo = array(
'Event' => array(
'className' => 'Event',
),
'Event',
'Org' => array(
'className' => 'Organisation',
),
'RequesterOrg' => array(
'className' => 'Organisation'
),
'SharingGroup' => array(
'className' => 'SharingGroup'
)
'SharingGroup'
);
public function attachTagToEvent($event_id, $tag_id) {

View File

@ -19,12 +19,8 @@ class EventTag extends AppModel {
);
public $belongsTo = array(
'Event' => array(
'className' => 'Event',
),
'Tag' => array(
'className' => 'Tag',
),
'Event',
'Tag'
);
// take an array of tag names to be included and an array with tagnames to be excluded and find all event IDs that fit the criteria

View File

@ -18,9 +18,5 @@ class News extends AppModel {
)
);
public $belongsTo = array(
'User' => array(
'className' => 'User',
)
);
public $belongsTo = 'User';
}

View File

@ -19,12 +19,8 @@ class ServerTag extends AppModel {
);
public $belongsTo = array(
'Server' => array(
'className' => 'Server',
),
'Tag' => array(
'className' => 'Tag',
),
'Server',
'Tag'
);
public function attachTagToServer($server_id, $tag_id) {

View File

@ -19,12 +19,8 @@ class Sighting extends AppModel {
);
public $belongsTo = array(
'Attribute' => array(
'className' => 'Attribute',
),
'Event' => array(
'className' => 'Event',
),
'Attribute',
'Event',
'Organisation' => array(
'className' => 'Organisation',
'foreignKey' => 'org_id'