added prev/next event ids
parent
f13dddb719
commit
e3d06ca103
|
@ -83,10 +83,14 @@ class EventsController extends AppController {
|
|||
}
|
||||
$options = array('conditions' => array('Event.' . $this->Event->primaryKey => $id));
|
||||
$event = $this->Event->find('first', $options);
|
||||
$this->Event->id = $id;
|
||||
$event_neighbors = $this->Event->find('neighbors');
|
||||
|
||||
$path = $configs['ZM_DIR_EVENTS'].'/'.$this->Image->getEventPath($event).'/';
|
||||
|
||||
$event['Event']['BasePath'] = $path;
|
||||
$event['Event']['Next'] = $event_neighbors['next']['Event']['Id'];
|
||||
$event['Event']['Prev'] = $event_neighbors['prev']['Event']['Id'];
|
||||
|
||||
$this->set(array(
|
||||
'event' => $event,
|
||||
|
|
Loading…
Reference in New Issue