Skip to content

Instantly share code, notes, and snippets.

@hobodave
Created September 10, 2008 00:30
Show Gist options
  • Save hobodave/9797 to your computer and use it in GitHub Desktop.
Save hobodave/9797 to your computer and use it in GitHub Desktop.
<?php
public function preUpdate($event) {
$this->preInsert($event);
}
public function preInsert($event) {
if ($this->chemical_id != 0 && $this->dChemical->profile_id != 0) {
$this->profile_id = $this->dChemical->profile_id;
}
$this->transferred_date = safe_date($this->transferred_date, 'Y-m-d');
$this->date_generated = safe_date($this->date_generated, 'Y-m-d');
$this->ship_date = safe_date($this->ship_date, 'Y-m-d');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment