Advertisement
Guest User

Untitled

a guest
May 19th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.57 KB | None | 0 0
  1.  function add() {
  2.        
  3.         if (!empty($this->data)) {
  4.             $this->Album->create();
  5.             if ($this->Album->saveAndUploadCover($this->data)) {
  6.                 $this->Session->setFlash(sprintf(__('The %s has been saved', true), 'album'));
  7.             //$this->redirect(array('action' => 'index'));
  8.             } else {
  9.                 $this->Session->setFlash(sprintf(__('The %s could not be saved. Please, try again.', true), 'album'));
  10.             }
  11.         }
  12.         $areas = $this->Album->Area->find('list');
  13.         $this->set(compact('areas'));
  14.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement