Beispiel #1
0
 public function restoreAction()
 {
     $file = $this->_request->getParam('file');
     if ($file) {
         $result = Snep_SoundFiles_Manager::verifySoundFiles($file, true);
         if ($result['fullpath'] && $result['backuppath']) {
             try {
                 exec("mv {$result['backuppath']}  {$result['fullpath']} ");
             } catch (Exception $e) {
                 throw new ErrorException($this->view->translate("Unable to restore file"));
             }
         }
     }
     $this->_redirect($this->getRequest()->getControllerName());
 }