Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save jkage/2935259 to your computer and use it in GitHub Desktop.

Select an option

Save jkage/2935259 to your computer and use it in GitHub Desktop.
public function index()
{
$this->set('filterFieldOptions',$this->filterFieldOptions);
$this->set('filterTypeConditionsOptions',$this->filterTypeConditionsOptions);
$this->set('filterStatusConditionsOptions',$this->filterStatusConditionsOptions);
$this->set('programTimezone', $this->Session->read($this->params['program'].'_timezone'));
if ($this->params['ext'] == 'csv' or $this->params['ext'] == 'json') {
$statuses = $this->History->find('all', array('conditions' => $this->_getConditions(),
'order'=> array('timestamp' => 'DESC')
));
$this->set(compact('statuses'));
} else {
$this->paginate = array(
'all',
'conditions' => $this->_getConditions(),
'order'=> array('timestamp' => 'DESC')
);
$statuses = $this->paginate();
$this->set(compact('statuses'));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment