Skip to content

Instantly share code, notes, and snippets.

@tareko
Created September 24, 2012 19:52
Show Gist options
  • Select an option

  • Save tareko/3777956 to your computer and use it in GitHub Desktop.

Select an option

Save tareko/3777956 to your computer and use it in GitHub Desktop.
attempt at fix?
function pdfUpdate() {
$this->loadModel('Calendar');
$calendars = $this->Calendar->find('list',array(
'id',
'start_date'));
foreach ($calendars as $id => $start_date) {
if (!$this->Calendar->needsUpdate($id)) {
$notUpdated[] = $id;
}
else {
$updated[] = $id;
// $this->Html->url("/app/webroot/pdf/EMA_Schedule-".$id."-".$start_date.".pdf");
$this->set('calendars', $this->Calendar->find('list'));
$this->set('masterSet', $this->Shift->getMasterSet($id));
$this->view = 'pdfCreate';
}
}
$this->set('updated', $updated);
$this->set('notUpdated', $notUpdated);
$this->render();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment