Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function add() {
- if (!empty($this->data)) {
- $this->Album->create();
- if ($this->Album->saveAndUploadCover($this->data)) {
- $this->Session->setFlash(sprintf(__('The %s has been saved', true), 'album'));
- //$this->redirect(array('action' => 'index'));
- } else {
- $this->Session->setFlash(sprintf(__('The %s could not be saved. Please, try again.', true), 'album'));
- }
- }
- $areas = $this->Album->Area->find('list');
- $this->set(compact('areas'));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement