SHARE
TWEET

Untitled

a guest May 19th, 2017 41 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.     }
RAW Paste Data
Want to get better at PHP?
Learn to code PHP in 2017
Top