Merge pull request #3307 from pliablepixels/optimize-event-api
API: allow option to not load the frames DB table
This commit is contained in:
commit
415dce6548
|
@ -143,6 +143,10 @@ class EventsController extends AppController {
|
||||||
$mon_options = '';
|
$mon_options = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$noFrames = $this->request->query('noframes');
|
||||||
|
if ($noFrames=='true')
|
||||||
|
$this->Event->unbindModel(array('hasMany' => array('Frame')));
|
||||||
|
|
||||||
$options = array('conditions' => array(array('Event.' . $this->Event->primaryKey => $id), $mon_options));
|
$options = array('conditions' => array(array('Event.' . $this->Event->primaryKey => $id), $mon_options));
|
||||||
$event = $this->Event->find('first', $options);
|
$event = $this->Event->find('first', $options);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue