コード例 #1
0
 public function removefileAction()
 {
     $file = $this->_request->getParam('file');
     $class = $this->_request->getParam('class');
     $className = Snep_SoundFiles_Manager::getClasse($class);
     $files = Snep_SoundFiles_Manager::getClassFiles($className);
     foreach ($files as $name => $path) {
         if ($file == $name) {
             exec("rm {$path['full']} ");
             if (!file_exists($path['full'])) {
                 Snep_SoundFiles_Manager::remove($name, $path['secao']);
             }
         }
     }
     $this->_redirect($this->getRequest()->getControllerName() . "/file/class/{$class}");
 }
コード例 #2
0
ファイル: SoundFilesController.php プロジェクト: rootzig/SNEP
 /**
  * Remove a Carrier
  */
 public function removeAction()
 {
     $this->view->breadcrumb = Snep_Breadcrumb::renderPath(array($this->view->translate("Sound Files"), $this->view->translate("Delete")));
     $id = $this->_request->getParam('id');
     Snep_SoundFiles_Manager::remove($id);
     exec("rm /var/lib/asterisk/sounds/pt_BR/{$id}");
     $this->_redirect($this->getRequest()->getControllerName());
 }