47
44
if (!empty($this->data)) {
48
45
$this->data['Vendor']['phone'] = preg_replace('/[[:punct:]]|[[:space:]]/','',$this->data['Vendor']['phone']);
49
46
if ($this->Vendor->save($this->data)) {
47
$this->Session->setFlash(__('The vendor has been saved', true),'default', array('class'=>'success-message'));
51
48
$this->redirect(array('action' => 'index'));
53
50
$this->Session->setFlash(__('The vendor could not be saved. Please, try again.', true));