示例#1
0
 /**
  * Delete a file
  *
  */
 public function deleteAction()
 {
     $id = $this->_getParam('id');
     $file = $this->fileService->getFile($id);
     if ($file) {
         if ($this->fileService->deleteFile($file)) {
             $this->flash("Deleted " . $file->getTitle());
         } else {
             $this->flash("Failed deleting " . $file->getTitle());
         }
     }
     $picker = $this->_getParam('picker');
     $returnUrl = $this->_getParam('returnurl');
     if (!empty($returnUrl)) {
         $this->redirect(base64_decode($this->_getParam('returnurl')), '', array('picker' => $picker));
     } else {
         $this->redirect('file', 'index', array('picker' => $picker, 'parent' => base64_encode($parent)));
     }
 }