public function setStorageDirAction()
 {
     $request = $this->getRequest();
     $path = base64_decode($request->getParam('path'));
     $this->view->msg = Application_Model_MusicDir::setStorDir($path);
 }
Example #2
0
 public function changeStorDirectoryAction()
 {
     $chosen = $this->getRequest()->getParam("dir");
     $element = $this->getRequest()->getParam("element");
     $watched_dirs_form = new Application_Form_WatchedDirPreferences();
     $res = Application_Model_MusicDir::setStorDir($chosen);
     if ($res['code'] != 0) {
         $watched_dirs_form->populate(array('storageFolder' => $chosen));
         $watched_dirs_form->getElement($element)->setErrors(array($res['error']));
     }
     $this->view->subform = $watched_dirs_form->render();
 }