Fix event Groups associations
This commit is contained in:
parent
e47c8fad88
commit
85b7baa131
|
@ -102,10 +102,6 @@ class EventsController extends AppController {
|
|||
*/
|
||||
public function view($id = null) {
|
||||
$this->loadModel('Config');
|
||||
$configs = $this->Config->find('list', array(
|
||||
'fields' => array('Name', 'Value'),
|
||||
'conditions' => array('Name' => array('ZM_DIR_EVENTS'))
|
||||
));
|
||||
|
||||
$this->Event->recursive = 1;
|
||||
if (!$this->Event->exists($id)) {
|
||||
|
@ -123,9 +119,6 @@ class EventsController extends AppController {
|
|||
$options = array('conditions' => array(array('Event.' . $this->Event->primaryKey => $id), $mon_options));
|
||||
$event = $this->Event->find('first', $options);
|
||||
|
||||
//$path = $configs['ZM_DIR_EVENTS'].'/'.$this->Image->getEventPath($event).'/';
|
||||
//$event['Event']['BasePath'] = $path;
|
||||
|
||||
# Get the previous and next events for any monitor
|
||||
$this->Event->id = $id;
|
||||
$event_neighbors = $this->Event->find('neighbors');
|
||||
|
|
|
@ -78,10 +78,10 @@ class Event extends AppModel {
|
|||
'className' => 'Group',
|
||||
'joinTable' => 'Groups_Monitors',
|
||||
'foreignKey' => 'MonitorId',
|
||||
'associationForeignKey' => 'GroupId',
|
||||
'associationForeignKey' => 'MonitorId',
|
||||
'unique' => true,
|
||||
'dependent' => false,
|
||||
'conditions' => 'Groups_Monitors.MonitorId=Event.MonitorId',
|
||||
'conditions' => '',
|
||||
'fields' => '',
|
||||
'order' => '',
|
||||
'limit' => '',
|
||||
|
|
Loading…
Reference in New Issue